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 |
|
Adam West
Constraint Violating Yak Guru
261 Posts |
Posted - 2009-08-19 : 14:37:19
|
| I am trying to get a list of all SOPNUMBE for a period.SOP101 is the header and 102 is the detail. Then I will sum up the extended price, but this right here is not compiling.SELECT sop10100.SOPNUMBE, SOP10100.SOPTYPE, SOP10200.SOPNUMBE, SOP10200.SOPTYPEFrom SOP10200.SOPTYPE = SOP10100.SOPTYPE AND SOP10200.SOPNUMBE = SOP10100.SOPNUMBE INNER JOINWHERE sop10200.CUSTNAME = 'Northern Tract' AND SOP10100.DOCDATE BETWEEN 07/01/09 AND 07/31/09 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-08-19 : 14:42:35
|
| [code]SELECT a.SOPNUMBE, a.SOPTYPE, b.SOPNUMBE, b.SOPTYPEFROM SOP10100 aINNER JOIN sop10200 bOn b.SOPTYPE = a.SOPTYPEAND b.SOPNUMBE = a.SOPNUMBE WHERE b.CUSTNAME = 'Northern Tract' AND a.DOCDATE BETWEEN '20090701' And '20090731'[/code] |
 |
|
|
Adam West
Constraint Violating Yak Guru
261 Posts |
Posted - 2009-08-19 : 14:56:23
|
| Thank you Russel. |
 |
|
|
|
|
|