Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Like based on prefix table
Message
De
14/05/2013 11:05:47
 
 
À
14/05/2013 11:00:28
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:
01573791
Vues:
48
>>Dunno what you mean - but you wouldn't need TRIM
>
>I would have to do more tests on this one.


You may need to adjust the collating sequence to CaseInsensitive
declare @TmpPrefix table
(	Prefix	varchar(8),
	Tag		varchar(8)
)

insert into @TmpPrefix (Prefix, Tag) values ('AB', 'CM111')
insert into @TmpPrefix (Prefix, Tag) values ('CD', 'CM111')

declare @TempTable table
(	Name	varchar(20)
)
insert into @TempTable (Name) values ('Abertimer')

select * 
	from @TmpPrefix
		join @TempTable on (Name like Prefix + '%')
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform