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.
| Author |
Topic |
|
saba9
Starting Member
4 Posts |
Posted - 2010-02-12 : 14:50:27
|
| Hi,Can someone help me outselect distinct cust.no, cust.branch, cust.name, cust.surname, term.benefit, term.code,tehi.trcode, tehi.trancode, dmhi.trancode, dmd.benefitfrom cust as cust inner join term as term on cust.rowno = term.rowno_custterm_custinner join tehi as tehi on term.rowno =tehi.rowno_termtehi_terminner join dmd as dmd on cust.rowno =dmd.rowno_custdmd_custinner join dmhi as dmhi on dmd.rowno =dmhi.rowno_dmddmhi_dmdI have tried with group by and having count but that gives me an error (it takes forever and then sql says doesnt have enough memory to sort) |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2010-02-12 : 15:01:28
|
| See ROW_Number() Function. Do you have indexes in tables? |
 |
|
|
saba9
Starting Member
4 Posts |
Posted - 2010-02-12 : 15:19:54
|
| No I don't have indexes |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|
|