-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Manikandan.Appar
Message 6 in Discussion
Hi Manoj,<o:p></o:p>
<o:p> </o:p>
Try this function.<o:p></o:p>
<o:p></o:p>
To Execute -> Select * from splitparam('Frirst+Second','+')<o:p></o:p>
<o:p> </o:p>
CREATE FUNCTION dbo.splitparam(@strIn varchar(8000),@param char(1))<o:p></o:p>
RETURNS <o:p></o:p>
@t_items table(RowId Int,Item varchar(8000))<o:p></o:p>
AS<o:p></o:p>
BEGIN<o:p></o:p>
Declare @i Int<o:p></o:p>
Declare @strElt varchar(8000), @sepPos int<o:p></o:p>
Set @i =1 <o:p></o:p>
Set @strIn = @strIn + @param<o:p></o:p>
Set @sepPos = charindex(@param, @strIn)<o:p></o:p>
WHILE isnull(@sepPos, 0) > 0<o:p></o:p>
BEGIN<o:p></o:p>
SET @strElt = LEFT(@strIn, @sepPos - 1)<o:p></o:p>
INSERT INTO @t_Items values (@i,RTRIM(LTRIM(@strElt))) <o:p></o:p>
SET @strIn = RIGHT(@strIn, DATALENGTH(@strIn) - @sepPos)<o:p></o:p>
Set @sepPos = charindex(@param, @strIn)<o:p></o:p>
Set @i = @i + 1 <o:p></o:p>
END<o:p></o:p>
RETURN<o:p></o:p>
END<o:p></o:p>
<o:p> </o:p>
tks,<o:p></o:p>
Manikandan<o:p></o:p>
-----------------------------------------------------------
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]