Advertisement
piotrek77

Untitled

Mar 21st, 2012
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.31 KB | None | 0 0
  1. select * from dbo.tablica1
  2.  
  3.  
  4.  
  5. SELECT  *
  6.   FROM (SELECT ROW_NUMBER() OVER (ORDER BY kol1 asc) as lp1, kol1 from dbo.[tablica1] where not kol1 is null ) as t1
  7.  
  8.  FULL OUTER JOIN (SELECT ROW_NUMBER() OVER (ORDER BY kol2 asc) as lp2 ,kol2 from dbo.[tablica1] where not kol2 is null )  as t2 on t1.lp1 = t2.lp2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement