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 |
|
sunila7
Starting Member
2 Posts |
Posted - 2001-05-21 : 11:19:29
|
| I am trying to use in clause while opening a Cursor in a Stored procedure. is it possible.The Stored procedure i used looks like thisCREATE PROCEDURE Hello ASDeclare @ChargetypeCode as Char(3)Declare @Description as char(100)set @ChargeTypeCode = 'BPF'+"," +'SOP'--print (@ChargeTypeCode)Declare Chargetype cursor forselect stockid from charge where chargetypecode in (@ChargeTypeCode)open ChargeTypeBEGINFETCH NEXT FROM Chargetype INTO @Description WHILE @@FETCH_STATUS = 0 BEGIN print @Description END FETCH NEXT FROM Chargetype INTO @DescriptionENDClose chargetypeDeallocate ChargeTypeThanks in AdvanceSunil |
|
|
|
|
|