Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help in Extraction of data on the conditions

Author  Topic 

pankaj2910
Starting Member

31 Posts

Posted - 2014-09-24 : 02:53:51
Hi,

I have a table having code
code
12345678
21345678
45789612
12345678
21345678
21345678
12347586


I want result on the basis of first 2 digit the repeatation of code is count as 1.
code1 code2 count
12 34 2
21 34 1
45 78 1

pankajrocks


pankajrocks

Arun Babu N
Starting Member

26 Posts

Posted - 2014-09-24 : 03:39:46
didnt understand.what is repeating in the code..?

arunbabu
Go to Top of Page

pankaj2910
Starting Member

31 Posts

Posted - 2014-09-24 : 03:44:07
Repeatation means the complete code repeat in the row

pankajrocks
Go to Top of Page
   

- Advertisement -