Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

malcom, heres the table defs and sample querey, thanks.

Status
Not open for further replies.

Ruairi

Programmer
May 14, 2000
314
US
TABLES:<br><br>Vendor<br>Rec <br>Name<br><br>Sorts<br>Rec <br>Abbrev <br><br>Destination<br>Rec <br>Name <br><br>Loads<br>Rec<br>Vendorrec (foreign key to Vendor.Rec) <br>Sortsrec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(foreign key to Sorts.Rec)<br>Destinationrec (foreign key to destination.Rec) <br>Net <br>Gross<br>Util<br>Pgross<br>Statusrec <br>Samplescaledflag<br>Weighedflag<br>Mtflag<br>Wieght <br><br>Logs<br>Rec<br>Loadsrec (foreign key to Loads.rec) <br><br>Heres what I would like to do. I don’t think I can because of the rule that if one column is aggregated they all must be aggregated or grouped. Grouping by all these columns causes too many work tables to be needed And the querey fails. <br><br>Select “vendor”=V.name, “sort’=S.name, ‘Dest’=D.name, ‘lrec’=LG.rec, ‘rec’=LD.rec, ‘vrec’=LD.vendorrec, ‘srec’=LD.sortsrec, ‘drec’=LD.destinationrec, ‘net’=LD.net, ‘gross’=LD.gross, ‘util’=LD.util, ‘Pgross’=LD.pgross, ‘status’=LD.statusrec, ‘sampled’=LD.samplescaledflag, ‘weighed’=LD.weighedflag, ‘mt’=LD.mtflag, ‘weight’=LD.weight<br>FROM loads as LD <br>Join vendor as V on (LD.vendorrec = V.rec) <br>Join sorts as S on (LD.sortsrec = S.rec) <br>Join destination as D on (LD.destinationrec = D.rec) <br>Full Outer Join logs as LG on (LD.rec = LG.loadsrec) <br><br>Thanks in advance for any help with this, or just for trying. <br><br>Ruairi<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top