Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
T-SQL replacement for 'AT()'
Message
De
26/11/2012 15:47:18
 
 
À
26/11/2012 15:42:33
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01558109
Message ID:
01558115
Vues:
54
>>>Hi All
>>>
>>>I'm looking for a T-SQL replacement for the VFP AT() function.
>>>
>>>I'm passing the where clause to a stored procedure and need the equivalent of
>>>
>>>
>>>** SrchWord is entered by user
>>>** Script is a field within the table
>>>WhrClause = "AT(Lower(SrchWord), Script) > 0"
>>>
>>>
>>>thanks
>>
>>Take a look at CHARINDEX and PATINDEX functions in BOL.
>
>CharIndex was what I was looking for, thanks

You might also take a look at "LIKE" in TSQL

http://bytes.com/topic/sql-server/answers/81467-using-charindex-vs-like-where
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform