Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicate values
Message
 
 
À
16/09/2004 09:31:16
Alvin Lourdes
Children and Youth Services Cluster
Toronto, Ontario, Canada
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00942860
Message ID:
00942891
Vues:
27
This message has been marked as the solution to the initial question of the thread.
>I would like to consider them duplicates.

It may not be most efficient way but it should provide you with starting point. Try
SELECT * 
	FROM mytable
	WHERE CAST(SUBSTRING(col1, PATINDEX('%[0-9]%', col1), 7) AS int) IN (
SELECT NumPart 
	FROM (
		SELECT *, CAST(SUBSTRING(col1, PATINDEX('%[0-9]%', col1), 7) AS int) AS NumPart
				FROM mytable ) dt1
	GROUP BY NumPart
	HAVING COUNT(*) > 1)
	ORDER BY CAST(SUBSTRING(col1, PATINDEX('%[0-9]%', col1), 7) AS int)
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform