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 |
|
Cynthia Blue
Starting Member
1 Post |
Posted - 2006-08-22 : 16:54:49
|
This query is close to what I want but not quite... can anyone help me out just a bit?My problem is... I want ALL the ( doc_actg_ln_no ) fields added to only the ( disc_ln_am fields > 0 ). This adds only the Ln_no fields which correspond to the disc_ln_am fields > 0.quote: select count(disc_ln_am) + max(doc_actg_ln_no) as Total, chk_no, doc_id, curr_sys_dtfrom ad_doc_actg where and (ad_doc_actg.disc_ln_am > 0)group by chk_no, doc_id, curr_sys_dthaving (count(disc_ln_am) + max(doc_actg_ln_no)) > 10
Thanks. |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
Posted - 2006-08-23 : 07:45:54
|
| Cynthia - I think you better supply the table structure, some sample data, and the desired output...Ryan Randallwww.monsoonmalabar.com London-based IT consultancy Solutions are easy. Understanding the problem, now, that's the hard part. |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
|
|
|
|
|