Jump to content

MYSQL error #1054 - Unknown column 'trxtal.groupno' in 'on clause'


varghesedxb

Recommended Posts

when i am running this query iam getting the following error:

 

select trxtal.groupno as groupn,artwork.artworkno as artworkno,count(trxtal.groupno) as grp from trxtal, mstcus LEFT JOIN artwork ON (trxtal.groupno=artwork.groupno and trxtal.classcode=artwork.classcode) where trxtal.groupno=mstcus.groupno group by mstcus.groupno having sum(artwork.artworkno)>0

 

 

#1054 - Unknown column 'trxtal.groupno' in 'on clause'

 

This query was working fine before with my old version of mysql, when i upgarde i am getting this error....pls help

 

MYSQL version:5.0.51b

Apache version :2.2.8

PHP version: 5.2.6

Use:

 

select trxtal.groupno as groupn,artwork.artworkno as artworkno,count(trxtal.groupno) as grp from (trxtal, mstcus) LEFT JOIN artwork ON (trxtal.groupno=artwork.groupno and trxtal.classcode=artwork.classcode) where trxtal.groupno=mstcus.groupno group by mstcus.groupno having sum(artwork.artworkno)>0

 

But really, don't use commas to join tables... it's very bad form.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.