-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: scienty77
Message 3 in Discussion
Hi Pavan, Since SQL Procs can take only defined params, you cannot send them directly.
What you can do is send them either comma seperated or some other literal what you are
comfortable with. In the proc, seperate every names [for example if u r passing names
like raghu, roopa, ravi, raju,] by finding our the position of ',' using CharIndex
function and Substring. Here is an example.... WHILE RTRIM(@StrIDs)<>''
BEGIN
Set @IntPos=CHARINDEX(',',@StrIDs,1)
Set @HEAD=SUBSTRING(@StrIDs,1,@IntPos-1)
Set @StrIDs=SUBSTRING(@StrIDs,@IntPos+1,LEN(@StrIDs))
Set @IntID = Convert(Int,@head )
Select @IntCounter = Count(*) From ACADEMY Where PROGRAM_LENGTH_CODE = @IntID
IF (@IntCounter = 0)
BEGIN
Delete From PROGRAM_LENGTH_MASTER Where PROGRAM_LENGTH_CODE = @IntID
END
ELSE
BEGIN
if (@Noneff = '')
set @Noneff = convert(varchar,@IntID)
else
SET @Noneff = @Noneff + ',' + convert(varchar,@IntID)
END
END Hope this helps you,. scorp
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]