One more thing: the question isn't "how to solve the problem" - becouse
it's very easy, but "wy it's working on 4.0.14 and not on 4.1.0".

> -----Original Message-----
> From: Marek Lewczyk [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 25, 2003 4:15 PM
> To: [EMAIL PROTECTED]
> Subject: "union" question
> 
> 
> 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/[EMAIL PROTECTED]
> 
> 


 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to