Unix Technical Forum

RE: different results in select ?

This is a discussion on RE: different results in select ? within the Informix forums, part of the Database Server Software category; --> Try add UNION ALL instead of UNION -----Original Message----- From: owner-informix-list@iiug.org [mailto wner-informix-list@iiug.org] On Behalf Of Erik Kurz Sent: ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 07:38 AM
Paul Watson
 
Posts: n/a
Default RE: different results in select ?


Try add UNION ALL instead of UNION

-----Original Message-----
From: owner-informix-list@iiug.org [mailtowner-informix-list@iiug.org]
On Behalf Of Erik Kurz
Sent: 10 September 2004 11:47
To: informix-list@iiug.org
Subject: different results in select ?


hi,

i get different results executing following selects: additional
information -> tab3 has no records!

1) SELECT tab1.*,tab2.*,'E11','EXP',
FROM tab1,tab2,
WHERE fakturen_nr = '123456',
AND tab2.rowid = tab1.id_leistungsart
result (3 records): tab1.*,tab2.*,E11,EXP
tab1.*,tab2.*,E11,EXP
tab1.*,tab2.*,E11,EXP

2) SELECT tab1.*,tab2.*,'E11','EXP',
FROM tab1,tab2,
WHERE fakturen_nr = '123456',
AND tab2.rowid = tab1.id_leistungsart,
UNION
SELECT tab3.*,tab2.*,'I10','IE',
FROM tab3,tab2,
WHERE fakturen_nr = '123456',
AND tab2.rowid = tab3.id_leistungsart
result (1 record !!!): tab1.*,tab2.*,E11,EXP

can anyone explain me this different results ?
is this a bug or is it just my mistake ?

thanks
erik



sending to informix-list
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:23 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com