I guess my question is that in my sp how can I make sure wether a substring
exists ina string or not.I'm using this now,is there something better :
SELECT @.tempString = REPLACE(UPPER(mySpParamter),'MEMBER','wo
w!')
IF @.tempString <> mySpParamter --This means that the MEMBER keyword is
part of the word
BEGIN
SET @.ClientType='MB'
END
thanksHow about :
If myspParamter like '%MEMBER%'
Begin
....
"Ray5531" wrote:
> I guess my question is that in my sp how can I make sure wether a substrin
g
> exists ina string or not.I'm using this now,is there something better :
> SELECT @.tempString = REPLACE(UPPER(mySpParamter),'MEMBER','wo
w!')
> IF @.tempString <> mySpParamter --This means that the MEMBER keyword is
> part of the word
> BEGIN
> SET @.ClientType='MB'
> END
>
> thanks
>
>|||Yours better,
Thanks
"dtbascent" <dtbascent@.discussions.microsoft.com> wrote in message
news:8FC6472D-4705-4753-AB47-B5DD1C0A2AE6@.microsoft.com...
> How about :
> If myspParamter like '%MEMBER%'
> Begin
> .....
> "Ray5531" wrote:
>|||Hi
Looks like 'MEMBER' will never exist in @.tempString because its replaced
with 'wow!'
best Regards,
Chandra
http://chanduas.blogspot.com/
---
"dtbascent" wrote:
> How about :
> If myspParamter like '%MEMBER%'
> Begin
> .....
> "Ray5531" wrote:
>|||yes,that's the key
then I check if it's different it mean it has been located(exists) and if it
dosen't exists replace returns the original string.
Thanks
"Chandra" <Chandra@.discussions.microsoft.com> wrote in message
news:BF8E3946-DB9D-410F-A6E2-40106B478976@.microsoft.com...
> Hi
> Looks like 'MEMBER' will never exist in @.tempString because its replaced
> with 'wow!'
> --
> best Regards,
> Chandra
> http://chanduas.blogspot.com/
> ---
>
> "dtbascent" wrote:
>
No comments:
Post a Comment