Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

T-sql Select statement Expand / Collapse
Author
Message
Posted Wednesday, October 06, 2010 7:59 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, March 26, 2012 5:05 AM
Points: 16, Visits: 136
i need to write a select statement that will show that there are duplicates. the first 4 are duplicates. so are the last 4. The Select statement must show only 2 results since there 2 duplicates

+27828214883
0828214883
27828214883
828214883
+27834793687
0834793687
27834793687
834793687
Post #999331
Posted Wednesday, October 06, 2010 8:04 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, March 05, 2014 4:14 AM
Points: 563, Visits: 971
cmoloto-996602 (10/6/2010)
i need to write a select statement that will sure that there are duplicates. the first 4 are duplicates. so are the last 4.

+27828214883
0828214883
27828214883
828214883
+27834793687
0834793687
27834793687
834793687


South African cellphone numbers... interesting...

I would be tempted to look at the last 9 characters, like this:

SELECT '+27(0)' + RIGHT(cellNumber, 9)
Post #999338
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse