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
 want to get record in this way...

Author  Topic 

fakhre
Starting Member

2 Posts

Posted - 2009-11-27 : 04:53:54
dear all,

i want to get the records in this way, all the unique records from table a and details of each record from table b.

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-11-27 : 04:56:14
can u post some sample data and required output

u can use row_number function to get unique records...........
Go to Top of Page

fakhre
Starting Member

2 Posts

Posted - 2009-11-27 : 05:15:23
table a is something look like this..
random no. pid color
1 NULL 1234AF FUCHSIA
2 d1zspez4yrz3jbvizmlasm55 1234AF GOLD
3 ns2qew45iw4slm55iwetfxiu 1234AF FUCHSIA
4 ns2qew45iw4slm55iwetfxiu 1268 BLACK
5 ns2qew45iw4slm55iwetfxiu 1375 BLACK
7 ns2qew45iw4slm55iwetfxiu 1268 BLACK
8 ns2qew45iw4slm55iwetfxiu 502968 BLACK
10 ns2qew45iw4slm55iwetfxiu 502968 BLACK
11 ns2qew45iw4slm55iwetfxiu 502968 BLACK
13 ns2qew45iw4slm55iwetfxiu 502968 BLACK
6 ns2qew45iw4slm55iwetfxiu 1409 BLACK
9 ns2qew45iw4slm55iwetfxiu 502968 BLACK
12 ns2qew45iw4slm55iwetfxiu 502968 BLACK

i want to have the records (unique ) from this table.. under the pid and want to get its details as pid from details table
i hope u understand ..
Go to Top of Page
   

- Advertisement -