[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.sqlserver.programming

InStr - Similar Syntax in Stored Procedure

magix

3/28/2007 6:54:00 PM

In Stored Procedure,

let say I have a Declare variable
FullName varchar(100)

How can I search in Stored Procedure , the Occurence of "John" in string
FullName at the very first position ?
Example in ASP:

InStr(1,FullName ,"John",1) =1



Thanks.



Regards,

Magix


3 Answers

magix

3/28/2007 7:02:00 PM

0

Found answer. Please ignore this. Thanks.
"magix" <magix@asia.com> wrote in message
news:460ab9c4$1_2@news.tm.net.my...
> In Stored Procedure,
>
> let say I have a Declare variable
> FullName varchar(100)
>
> How can I search in Stored Procedure , the Occurence of "John" in string
> FullName at the very first position ?
> Example in ASP:
>
> InStr(1,FullName ,"John",1) =1
>
>
>
> Thanks.
>
>
>
> Regards,
>
> Magix
>
>


Alejandro Mesa

3/28/2007 7:02:00 PM

0

magix,

See function "patindex" in BOL.


AMB


"magix" wrote:

> In Stored Procedure,
>
> let say I have a Declare variable
> FullName varchar(100)
>
> How can I search in Stored Procedure , the Occurence of "John" in string
> FullName at the very first position ?
> Example in ASP:
>
> InStr(1,FullName ,"John",1) =1
>
>
>
> Thanks.
>
>
>
> Regards,
>
> Magix
>
>
>

ML

3/28/2007 7:46:00 PM

0

Could you share where and what you found? Perhaps someone else has a similar
problem...


ML

---
http://milambda.blo...