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 |
senthilramtrs
Starting Member
29 Posts |
Posted - 2008-05-13 : 05:57:41
|
this stored procedure is returning -1 always ....but i want 1 or 0....CREATE procedure checkNumberAvailable@CNumber varchar(20)asif exists (SELECT * from Entry where BillNumber=@CNumber )return 1elsereturn 0GO Regards,Senthil Ram TRS |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-05-13 : 06:12:31
|
How are you executing the procedure and getting return value?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-05-13 : 06:12:39
|
[code]CREATE procedure checkNumberAvailable( @CNumber varchar(20))asset nocount onif exists (SELECT * from Entry where BillNumber = @CNumber) return 1return 0[/code] E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|