Actually it was the alias, but the query is producing the wrong results. It
should produce 3 results which I get in Access I cut and paste this query into
mysql and get 12371 results. Same databases.






"Cal Evans" <[EMAIL PROTECTED]> on 06/06/2002 08:50:51 AM

Please respond to [EMAIL PROTECTED]

To:   Scott Raley/LPEC/ASD/SEMCORINC@SEMCOR INC., [EMAIL PROTECTED],
      [EMAIL PROTECTED]
cc:

Subject:  RE: mysql query help



I've not looked over your query in-depth so I may be off-base here.  Try
removing the parentheses from the FROM clause and see if that makes it work.

=C=

*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*


-----Original Message-----
From: Scott Raley [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 7:23 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: mysql query help





I need some help... The query below runs
fine in access, when running it in mysql it tells me the column wrainfo.wuc
doesn't exist in the having clause.. can't figure out why its giving me this
error. the column is in the select statement...  any ideas? The column does
exist.. I'm looking at the database right now.

Query:

SELECT wrainfo.wuc5, wucinfo.wuc, wucinfo.nomen, wucpartsinfo.weapon,
wucinfo.refdes, wucpartsinfo.seq, parts.part_no, wucpartsinfo.tms,
wucpartsinfo.sbuno, wucpartsinfo.ebuno, wucpartsinfo.lots, parts.cage,
wucpartsinfo.smr, wucpartsinfo.se1, wucpartsinfo.se2, parts.niin,
wucpartsinfo.changes, min(updates.updates) as udate, wrainfo.wuc as srawuc,
wucpartsinfo.notea, wucpartsinfo.noteb
FROM (((wucpartsinfo LEFT JOIN parts ON wucpartsinfo.parts_id
=parts.parts_id)
LEFT JOIN updates on wucpartsinfo.wucpn_id=updates.wucpart_id) RIGHT JOIN
wucinfo on wucpartsinfo.wuc_id=wucinfo.wuc_id) RIGHT JOIN wrainfo on
wucinfo.wuc5 = wrainfo.wuc5
where wrainfo.WUC5 = '46X1B'
group by wrainfo.wuc5, wucinfo.wuc, wucinfo.nomen, wucpartsinfo.weapon,
wucinfo.refdes, wucpartsinfo.seq, parts.part_no, wucpartsinfo.tms,
wucpartsinfo.sbuno, wucpartsinfo.ebuno, wucpartsinfo.lots, parts.cage,
wucpartsinfo.smr, wucpartsinfo.se1, wucpartsinfo.se2, parts.niin,
wucpartsinfo.changes, wrainfo.wuc, wucpartsinfo.notea, wucpartsinfo.noteb
having (wucinfo.wuc <> wrainfo.wuc)
order by wucinfo.wuc, wucpartsinfo.seq







---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php









---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to