Click here to Skip to main content
15,891,847 members
Home / Discussions / Database
   

Database

 
QuestionSQL Server 2005:Problem with full-text indexing Pin
rahulae9-Dec-08 13:37
rahulae9-Dec-08 13:37 
AnswerRe: SQL Server 2005:Problem with full-text indexing Pin
Howard Richards9-Dec-08 23:03
Howard Richards9-Dec-08 23:03 
Questionprocedure in SQL Pin
papy-boom9-Dec-08 9:40
papy-boom9-Dec-08 9:40 
AnswerRe: procedure in SQL Pin
Wendelius9-Dec-08 10:03
mentorWendelius9-Dec-08 10:03 
GeneralRe: procedure in SQL Pin
papy-boom9-Dec-08 10:08
papy-boom9-Dec-08 10:08 
GeneralRe: procedure in SQL Pin
Wendelius9-Dec-08 10:15
mentorWendelius9-Dec-08 10:15 
GeneralRe: procedure in SQL Pin
papy-boom9-Dec-08 10:25
papy-boom9-Dec-08 10:25 
GeneralRe: procedure in SQL Pin
Wendelius9-Dec-08 10:37
mentorWendelius9-Dec-08 10:37 
papy-boom wrote:
tried to get select @@IDENTITY AS returnedvalue to get the name of column but it doesn't work


No, because it only returns the value.

papy-boom wrote:
i have a datareader to read the value returned value and the argument to pass to datareader is the name of the column so if my procedure return me a value without the name of column it's not simple to get the value


Now I don't follow the logic. You cannot ask the last added value for a single column using @@IDENTITY. It doesn't work that way.

If you need to know what's the last added identity value to a specific table, you can select MAX from the identity column. But I don't see the point why you should do this since the value of an identity column is normally irrelevant. Refer to: http://en.wikipedia.org/wiki/Surrogate_key[^]

So the question is, why do you wan't to know the value at all?

The need to optimize rises from a bad design.My articles[^]

GeneralRe: procedure in SQL Pin
papy-boom9-Dec-08 12:18
papy-boom9-Dec-08 12:18 
GeneralRe: procedure in SQL Pin
Wendelius9-Dec-08 18:31
mentorWendelius9-Dec-08 18:31 
GeneralRe: procedure in SQL Pin
papy-boom9-Dec-08 22:03
papy-boom9-Dec-08 22:03 
AnswerRe: procedure in SQL Pin
Mycroft Holmes9-Dec-08 16:04
professionalMycroft Holmes9-Dec-08 16:04 
GeneralRe: procedure in SQL Pin
papy-boom9-Dec-08 21:59
papy-boom9-Dec-08 21:59 
GeneralRe: procedure in SQL Pin
Ashfield10-Dec-08 1:17
Ashfield10-Dec-08 1:17 
GeneralRe: procedure in SQL Pin
papy-boom10-Dec-08 2:05
papy-boom10-Dec-08 2:05 
QuestionPass Insert SQL Statement to MS-SQL DB via BAT script Pin
mil_an8-Dec-08 23:19
mil_an8-Dec-08 23:19 
AnswerRe: Pass Insert SQL Statement to MS-SQL DB via BAT script Pin
Colin Angus Mackay8-Dec-08 23:50
Colin Angus Mackay8-Dec-08 23:50 
GeneralRe: Pass Insert SQL Statement to MS-SQL DB via BAT script Pin
mil_an9-Dec-08 0:55
mil_an9-Dec-08 0:55 
GeneralRe: Pass Insert SQL Statement to MS-SQL DB via BAT script Pin
Ashfield9-Dec-08 1:21
Ashfield9-Dec-08 1:21 
GeneralRe: Pass Insert SQL Statement to MS-SQL DB via BAT script [modified] Pin
mil_an9-Dec-08 22:19
mil_an9-Dec-08 22:19 
QuestionProblem With Update Query Pin
chandrubngit8-Dec-08 19:14
chandrubngit8-Dec-08 19:14 
AnswerRe: Problem With Update Query Pin
Wendelius9-Dec-08 9:38
mentorWendelius9-Dec-08 9:38 
QuestionCan anyone help me Rectify this SQL Query................ Pin
Reality Strikes8-Dec-08 8:23
Reality Strikes8-Dec-08 8:23 
QuestionSql Server to Oracle Pin
Civic068-Dec-08 4:36
Civic068-Dec-08 4:36 
AnswerRe: Sql Server to Oracle Pin
Wendelius8-Dec-08 4:46
mentorWendelius8-Dec-08 4:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.