Click here to Skip to main content
15,905,323 members
Home / Discussions / Database
   

Database

 
QuestionSQL Select Question Pin
Aptiva Dave7-Jul-10 8:25
Aptiva Dave7-Jul-10 8:25 
AnswerRe: SQL Select Question Pin
Corporal Agarn7-Jul-10 8:56
professionalCorporal Agarn7-Jul-10 8:56 
AnswerRe: SQL Select Question Pin
Dr.Walt Fair, PE7-Jul-10 10:22
professionalDr.Walt Fair, PE7-Jul-10 10:22 
AnswerRe: SQL Select Question Pin
Jeremy Hutchinson14-Jul-10 8:01
professionalJeremy Hutchinson14-Jul-10 8:01 
QuestionUniqueIdentifier Foreign Key Pin
tek 20096-Jul-10 23:43
tek 20096-Jul-10 23:43 
AnswerRe: UniqueIdentifier Foreign Key Pin
Ray Cassick7-Jul-10 2:25
Ray Cassick7-Jul-10 2:25 
AnswerRe: UniqueIdentifier Foreign Key Pin
Bernhard Hiller7-Jul-10 3:52
Bernhard Hiller7-Jul-10 3:52 
AnswerRe: UniqueIdentifier Foreign Key Pin
Mycroft Holmes7-Jul-10 13:09
professionalMycroft Holmes7-Jul-10 13:09 
You use NEWID() to generate the new ID key, you need to trap this and pass it back to the client so it can be put into @ID for the second insert.

Insert1
Does not need @ID passed in as it is not used.
Create a new ID @CreatedID in the proc but outside the insert statement
Insert the record using the @CreatedID
After the insert select @CreatedID as NewID will return it to the client
Never underestimate the power of human stupidity
RAH

QuestionExcel to Access Pin
KORCARI6-Jul-10 6:04
KORCARI6-Jul-10 6:04 
AnswerRe: Excel to Access Pin
riced6-Jul-10 6:50
riced6-Jul-10 6:50 
QuestionBlatant advertising Pin
Richard MacCutchan5-Jul-10 6:55
mveRichard MacCutchan5-Jul-10 6:55 
AnswerRe: Blatant advertising Pin
J4amieC5-Jul-10 21:56
J4amieC5-Jul-10 21:56 
GeneralRe: Blatant advertising Pin
Richard MacCutchan5-Jul-10 22:02
mveRichard MacCutchan5-Jul-10 22:02 
Questionsql function Pin
Thanusree Duth5-Jul-10 2:28
Thanusree Duth5-Jul-10 2:28 
AnswerRe: sql function Pin
Simon_Whale5-Jul-10 2:52
Simon_Whale5-Jul-10 2:52 
AnswerRe: sql function Pin
J4amieC5-Jul-10 3:24
J4amieC5-Jul-10 3:24 
Questionsql Pin
Thanusree Duth4-Jul-10 23:02
Thanusree Duth4-Jul-10 23:02 
AnswerRe: sql Pin
J4amieC4-Jul-10 23:58
J4amieC4-Jul-10 23:58 
GeneralRe: sql Pin
R. Giskard Reventlov5-Jul-10 0:22
R. Giskard Reventlov5-Jul-10 0:22 
GeneralRe: sql Pin
J4amieC5-Jul-10 0:41
J4amieC5-Jul-10 0:41 
GeneralRe: sql Pin
Mycroft Holmes5-Jul-10 0:48
professionalMycroft Holmes5-Jul-10 0:48 
AnswerRe: sql Pin
R. Giskard Reventlov5-Jul-10 0:04
R. Giskard Reventlov5-Jul-10 0:04 
QuestionSQL FUNCTION USING DATE TIME Pin
Thanusree Duth4-Jul-10 22:10
Thanusree Duth4-Jul-10 22:10 
AnswerRe: SQL FUNCTION USING DATE TIME Pin
J4amieC4-Jul-10 23:56
J4amieC4-Jul-10 23:56 
GeneralRe: SQL FUNCTION USING DATE TIME Pin
JasonShort5-Jul-10 6:10
JasonShort5-Jul-10 6:10 

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.