Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
argate7
Starting Member
7 Posts |
Posted - 2009-04-10 : 15:55:53
|
Hi, i'm new in your company and new in the SQL's company.I need your help with a stored procedure. I'm giving you the tables...C1:C1NO(PK),C1NAME,C1SURNAMEE2:E2NO(PK),E2NAME,E2SURNAMEO3:O3NO(PK),C1NO(FK),E2NO(FK)I4:I4NO(PK),I4NAME,I4SURNAMED5:O3NO(PK),D5NO(PK),I4NO(FK),D5QUANTITYI need to write 2 stored procedures...1)Write a stored procedure to return C1 details based on the C1NO, which will be given as a parameter.And my answer is...create procedure C1_details@C1NO intasselect *from C1where C1NO = @C1NOAnd my question is...That's rigth??or not?and where is the problem?2)Write a stored procedure that displays error handling techniques when inserting data into tables that are related.Can anyone help me with this procedure? How i have to implement this one?Thank you very muxh for your help and your time! |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
argate7
Starting Member
7 Posts |
Posted - 2009-04-10 : 16:10:53
|
create procedure O3_C1@O3NO int@C1NO int@E2NO intasinsert into O3(O3NO,C1NO,E2NO)values(@O3NO,@C1NO,@E2NO)How you see this one?? It's right or wrong? |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|
|