By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 1,708 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

"union" question

P: n/a
Hello,
Currently I'm testing my app using MySQL 4.1.0 version, and I have a
strange error during execution a union query.

(SELECT IF(_DAT.pri <=> null, null, ROUND(_DAT.pri/1.22)) AS pri_net,
IF(_DAT.pri <=> null, null, ROUND(_DAT.price*1)) AS pri_gross,
_DAT.cuid, _CUR.code FROM tab1 _DAT, tab2 _CUR WHERE _DAT.eid = '6925'
AND _DAT.did = '3' AND _CUR.cuid = _DAT.cuid )
UNION
(SELECT IF(pri <=> null, null, ROUND(pri/1.22)) AS prinet, IF(pri <=>
null, null, ROUND(pri*1)) AS pri_gross, null AS cuid, null AS code FROM
tab3 WHERE eid = '6925' AND did = '3' AND (enid = '1358' OR boid =
'1004' OR trid = '779' OR coid = '9773') ORDER BY coid DESC, veid DESC,
yeid DESC, trid DESC, boid DESC, enid DESC LIMIT 1 )

In version 4.0.14 all was working fine, but there is an error in 4.1.0:
"Column 'code' cannot be null"

Any ideas ??

Regards,
ML


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.