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 |
|
jhon11
Starting Member
42 Posts |
Posted - 2007-11-07 : 10:50:19
|
| hi,I wirte down a small query and i wanna write down a store procudure for that..can somebody help me out for this ASAP...its urgent..Select Id,address1,address2,city,state,zip from xyz where city is nullHOW TO WRITE STORE PROCEDURE..Do I need to delcare parameter and value...??? can't I just save this query directly by sayingCREATE PROCEDURE AS... and than save...beacuae my boss just wanna keep that procudure as reference to run that.looking for QUICK reply |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-11-07 : 10:55:51
|
You are right!Put "CREATE PROCEDURE xxx AS" before query code and execute. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
jhon11
Starting Member
42 Posts |
Posted - 2007-11-07 : 11:39:55
|
| Do I also need to EXEC at the end of the procedure or I have to execute it manually?? |
 |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2007-11-07 : 11:43:29
|
quote: Originally posted by jhon11 looking for QUICK reply
Oh, well in that case, let us all drop everything.You do not put EXEC inside the store proc. You would do that separately/manually. |
 |
|
|
|
|
|