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 |
pebkacbigdatauser
Starting Member
23 Posts |
Posted - 2012-07-02 : 20:26:50
|
edit |
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2012-07-03 : 04:47:33
|
Why do you need to do a cross join? I can't quite tell from your problem why you can't just do a normal join to PNUM but nor can I quite work out the relation. The fact you have a distinct in there is usually a strong hint you've stuffed up your joining somewhere. |
 |
|
SlinginParts
Starting Member
18 Posts |
Posted - 2012-07-03 : 18:01:17
|
quote: Originally posted by LoztInSpace Why do you need to do a cross join? I can't quite tell from your problem why you can't just do a normal join to PNUM but nor can I quite work out the relation. The fact you have a distinct in there is usually a strong hint you've stuffed up your joining somewhere.
Well I chased down the distinct issue, there was a column totally value that I needed to use MAX on to prevent a bunch of duplicates on that. But I'm still not sure how to write the query more efficiently. |
 |
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2012-07-03 : 18:27:03
|
Can you show the tables & relations? I can't work out how you are joining to PNUM.Your duplicate is still a concern. |
 |
|
pebkacbigdatauser
Starting Member
23 Posts |
Posted - 2012-07-03 : 20:52:37
|
editHope that helps! |
 |
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2012-07-10 : 02:16:02
|
No it does not. I can't see anything now. |
 |
|
|
|
|