If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Query doesn't work

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-05-10, 12:57
adr123 adr123 is offline
Registered User
 
Join Date: Jan 2010
Posts: 3
Query doesn't work

Hi all! I execute the following query
select * from (select id from test) test
but informix tells me that i have a syntax error
The same SQL works great on other dbs. What's the problem here?
Reply With Quote
  #2 (permalink)  
Old 01-05-10, 14:02
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,084
try it like this --

select * from (select id from test) any_alias_except_test
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 01-05-10, 16:01
adr123 adr123 is offline
Registered User
 
Join Date: Jan 2010
Posts: 3
Still doesn't work. BTW my Informix version is 10 FC8
Reply With Quote
  #4 (permalink)  
Old 01-06-10, 04:44
adr123 adr123 is offline
Registered User
 
Join Date: Jan 2010
Posts: 3
Found solution for derived tables

Found a solution. In Informix 10 it should be:

select * from table(multiset(select id from test)) test

In Informix 11 this is fixed.
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On