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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-05-06 : 07:57:43
|
| amit writes "sir,I want to make a stored proc. through which I can insert the mandatory data to some of the tables of my database of my application.How can i do that" |
|
|
harshal_in
Aged Yak Warrior
633 Posts |
Posted - 2003-05-06 : 08:40:47
|
quote: amit writes "sir,I want to make a stored proc. through which I can insert the mandatory data to some of the tables of my database of my application.How can i do that"
Create a stored proc with specifying input parameters ,refer to BOL for details.Expect the UnExpected |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-05-06 : 09:46:25
|
| CREATE PROC myPROC @var1 varchar(10), @var2 int, @var3 datetime --this is up to youASDECLARE @Result int, @ErrorOutINSERT INTO myTable (col1, col2, col3) SELECT @var1, @var2, @var3Select @Result = @@Rowcount, @ErrorOut = @@ErrorIf @Resut = 0 Or @ErrorOut <> 0 Return -1 Else Return 0GOBrett8-) |
 |
|
|
|
|
|