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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.