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

Database

 
GeneralRe: Must Declare Scalar variable Pin
Mycroft Holmes19-Jan-11 14:05
professionalMycroft Holmes19-Jan-11 14:05 
GeneralRe: Must Declare Scalar variable Pin
Ali Al Omairi(Abu AlHassan)19-Jan-11 14:13
professionalAli Al Omairi(Abu AlHassan)19-Jan-11 14:13 
GeneralRe: Must Declare Scalar variable Pin
Hiren solanki19-Jan-11 19:21
Hiren solanki19-Jan-11 19:21 
GeneralRe: Must Declare Scalar variable Pin
Ali Al Omairi(Abu AlHassan)20-Jan-11 7:40
professionalAli Al Omairi(Abu AlHassan)20-Jan-11 7:40 
GeneralRe: Must Declare Scalar variable Pin
Roger Wright20-Jan-11 10:44
professionalRoger Wright20-Jan-11 10:44 
GeneralRe: Must Declare Scalar variable Pin
Hiren solanki20-Jan-11 18:28
Hiren solanki20-Jan-11 18:28 
GeneralRe: Must Declare Scalar variable Pin
Ali Al Omairi(Abu AlHassan)21-Jan-11 7:18
professionalAli Al Omairi(Abu AlHassan)21-Jan-11 7:18 
QuestionLittle help needed with a Stored Proc Pin
Aptiva Dave19-Jan-11 6:57
Aptiva Dave19-Jan-11 6:57 
I am currently writing a stored proc for a database that will help create a new user. The logic I am using is something I had used before, but then I had used three separate stored procs and thought it would be more effecient to just call one stored proc to handle the whole job. Here are the tables I am using:
users:
userID (primary key, IsIdentity turned on)
firstName
lastName
sex
authenticationID (foreign key that points back to the authentication table)
contactID (foreign key that points back to the contact table)

authentication:
authenticationID (primary key, IsIdentity turned on)
userName
password

contact:
contactID (primary key, IsIdentity turned on)
street
city
state
emailAddress

In my stored proc, I pass in all of the parameters needed for each table (listed above, except, of course, the identity fields) and start the inserts. Since I need the contact and authentication inserts done first, I naturally would want to start with those tables, but how would I get the ID fields for each tables so I can insert them into the users table?
AnswerRe: Little help needed with a Stored Proc Pin
Eddy Vluggen19-Jan-11 7:17
professionalEddy Vluggen19-Jan-11 7:17 
AnswerRe: Little help needed with a Stored Proc Pin
Corporal Agarn19-Jan-11 7:23
professionalCorporal Agarn19-Jan-11 7:23 
AnswerRe: Little help needed with a Stored Proc Pin
Aptiva Dave19-Jan-11 7:47
Aptiva Dave19-Jan-11 7:47 
AnswerRe: Little help needed with a Stored Proc Pin
Martin Arapovic19-Jan-11 7:48
Martin Arapovic19-Jan-11 7:48 
QuestionCompare table data on two different databases Pin
vanikanc19-Jan-11 5:49
vanikanc19-Jan-11 5:49 
AnswerRe: Compare table data on two different databases Pin
Chris Meech19-Jan-11 6:01
Chris Meech19-Jan-11 6:01 
GeneralRe: Compare table data on two different databases Pin
Corporal Agarn19-Jan-11 6:04
professionalCorporal Agarn19-Jan-11 6:04 
GeneralRe: Compare table data on two different databases Pin
Chris Meech19-Jan-11 6:41
Chris Meech19-Jan-11 6:41 
AnswerRe: Compare table data on two different databases Pin
Corporal Agarn19-Jan-11 6:05
professionalCorporal Agarn19-Jan-11 6:05 
GeneralRe: Compare table data on two different databases Pin
vanikanc19-Jan-11 6:59
vanikanc19-Jan-11 6:59 
AnswerRe: Compare table data on two different databases Pin
Corporal Agarn19-Jan-11 7:18
professionalCorporal Agarn19-Jan-11 7:18 
AnswerRe: Compare table data on two different databases Pin
Eddy Vluggen19-Jan-11 7:20
professionalEddy Vluggen19-Jan-11 7:20 
Questionbcp command Pin
vanikanc19-Jan-11 3:22
vanikanc19-Jan-11 3:22 
AnswerRe: bcp command Pin
Pravin Patil, Mumbai19-Jan-11 3:58
Pravin Patil, Mumbai19-Jan-11 3:58 
QuestionWhen to NOT normalize? Pin
Sander Rossel18-Jan-11 10:48
professionalSander Rossel18-Jan-11 10:48 
AnswerRe: When to NOT normalize? Pin
dasblinkenlight18-Jan-11 12:03
dasblinkenlight18-Jan-11 12:03 
AnswerRe: When to NOT normalize? PinPopular
Mycroft Holmes18-Jan-11 13:46
professionalMycroft Holmes18-Jan-11 13: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.