473,699 Members | 2,386 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"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.pric e*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
0 1719

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
12838
by: KENNY L. CHEN | last post by:
Dear experts, I have two tables in my Oracle 8i database: TEST (COL1,COl2,REC_NO) and TEST1 (COL1,COL2,REC_NO). Both tables are unique-indexed on (COL1,COL2,REC_NO). I think the following SQL commands will return the same result but one of my friends don't think so. He said "QUERY 1" will return 1 unsorted record (ROWNUM < 2 ) first then sort the result (ORDER BY COL1 ASC,
0
1347
by: Marek Lewczyk | last post by:
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,...
2
5340
by: thomasfj | last post by:
Hi, Accroding to MS documentation the use of union and list elements in XSD simpleType (valid according to W3C standards) is valid used as an dataset schema...but it's not!! When loading the schema (ReadXmlSchema method) you get this error message: doesn't support 'union' or 'list' as simpleType
0
1329
by: Codex Twin | last post by:
hello group: The following is a fragment from a schema which defines the EWethnicCategoryStructure type. As you can see, its type is defined by the SimpleType enumeration EWethnicCategoryType. EWethnicCategoryType is defined as a union with the CommonEthnicCategoryType SimpleType enumeration. Now when I use the XSD tool to create a C# class of this schema, the resulting code does not include the SelectedEthnicCategory enumeration.
1
7774
by: CrystalDBA | last post by:
I usually design applications in SQL Server and Crystal Reports. I now need to create a crystal report on an MS Access database. I have two tables: Services: Date datetime Entry text Amount number (should be 4 records)
3
1439
by: usr.root | last post by:
hi,who knows how does the compiler work after it see the "union" word in your code .
4
5981
by: Yair | last post by:
Hi, I need to shift the bits of a float type. In order to do so, I declared the following struct: private struct unionIntFloatType { public float m_asFloat;
3
11814
by: John Sasso | last post by:
In my Yacc .y file I defined: %union { int value; struct Symbol Sym; } The Symbol struct I defined in a header file I #included in the Prologue section of the .y file as:
7
2932
by: php_mysql_beginer911 | last post by:
Hi .. hope someone will help i am trying to figure it out why i cannot post string "union select" every time i try to post data which content union and select .. the page doesn't get posted and it shows error page not found on this server i googled and found some people use union and select to hack sites (mysql injection) i guess the server i am using has some kind of filter and if a post string content "union select" ... it simply...
0
8613
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8908
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7745
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4374
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.