Shortest code wins and gets a purple star. do not post your solutions yet, just post the length of your SQL statement
you can use SQL server 2005 windowing functions, temp tables whatever you like
here is the table
expected output
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
Google Interview Questions
you can use SQL server 2005 windowing functions, temp tables whatever you like
here is the table
Code:
create table blah2 (Col1 varchar(666) primary key clustered)
insert blah2 values('AAAAA')
insert blah2 values('ABBBBB')
insert blah2 values('ACCCCC')
insert blah2 values('BAAAAA')
insert blah2 values('BBBBBB')
insert blah2 values('BCCCCC')
expected output
Code:
Col1 Row
AAAAA 1
ABBBBB 1
ACCCCC 1
BAAAAA 2
BBBBBB 2
BCCCCC 2
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
Google Interview Questions