-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: BalajiKrishnan
Message 4 in Discussion
No still i have the same problem... pls look in to the logic i had changed.....
DECLARE myCursor CURSOR FOR SELECT field_1, field_2 FROM tbl_chk
DECLARE @field_1 VARCHAR(3), @field_2 VARCHAR(11), @delimiter VARCHAR(1), @searchFor
VARCHAR(11), @searchString VARCHAR(10), @tempSearchFor VARCHAR(11)
DECLARE @found INT
BEGIN
SET NOCOUNT ON
SELECT @searchFor = '55,56,57', @tempSearchFor = @searchFor, @found = 0, @delimiter =
1 OPEN myCursor
FETCH NEXT FROM myCursor INTO @field_1, @field_2
WHILE (@@FETCH_STATUS = 0)
BEGIN
WHILE (@delimiter > 0)
BEGIN
SET @delimiter = CHARINDEX (',', @tempsearchFor)
IF (@delimiter <> 0)
BEGIN
SET @searchString = SUBSTRING (@tempSearchFor, 1, @delimiter-1)
SET @tempSearchFor = SUBSTRING (@tempSearchFor, @delimiter+1, LEN
(@tempSearchFor)[EMAIL PROTECTED])
END
ELSE
SET @searchString = @tempSearchFor IF (CHARINDEX (',' + @searchString + ',',
',' + @field_2 + ',') <> 0)
SET @found = @found + 1
ELSE
SET @found = @found - 1
END
IF (@found = 4)
BREAK SELECT @tempSearchFor = @searchFor, @found = 0, @delimiter = 1
FETCH NEXT FROM myCursor INTO @field_1, @field_2
END
CLOSE myCursor
DEALLOCATE myCursor IF (@found IN (1, 2, 3, 4))
SELECT 'Pattern already exists. Cannot insert the given value'
ELSE
SELECT 'Pattern does not exist and can be inserted' SET NOCOUNT OFF
END
how can i solve it.....
-----------------------------------------------------------
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]