Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Like based on prefix table
Message
De
14/05/2013 10:32:20
 
 
À
14/05/2013 10:27:20
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01573772
Message ID:
01573782
Vues:
48
>>>I have a Prefix tables containing records with a Prefix field such as "AB", "KN", "LL" and "BB" as well as a Tag field such as "CM111", "CM222", "CM333" and "
>>>"CM444". I process a main table having a title such as "Abertimer". For each record of that table, I need to find the record in teh Prefix table so I can extract the Tag value. For example, in this case, it would be the one having a Prefix field "AB". This is because "Abertimer" starts with "AB". I am not sure about the syntax to use. The reason I ask is that I also have Prefix values having four letters. So, I cannot compare with the first two letters only. This is variable. Anyone would have an idea on how to do this?
>>
>>
>>something like this ?
>>
>>  where ... like Prefix + "%"
>>
>Perhaps you need to trim the prefix here?


Perhaps - yes - but I supposed a VarChar() field
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform