Unix Technical Forum

Support of sql-92 select statement

This is a discussion on Support of sql-92 select statement within the Informix forums, part of the Database Server Software category; --> We've been given the SQL source code for an application written to sql-92 standards. Some of the syntax looks ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 08:28 PM
Fred Prose
 
Posts: n/a
Default Support of sql-92 select statement

We've been given the SQL source code for an application written to
sql-92 standards. Some of the syntax looks like this:

select
c_count,
count(*) as custdist
from
(
select
c_custkey,
count(o_orderkey)
from
customer left outer join orders on
c_custkey = o_custkey
and o_comment not like
'%express%deposits%'
group by
c_custkey
) as c_orders (c_custkey, c_count)
group by
c_count
order by
custdist desc,
c_count desc;

Correct me if I'm wrong, but I don't see that IDS 9.x supports this?

Fred Prose
Arizona Supreme Court
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 08:28 PM
Richard Harnden
 
Posts: n/a
Default Re: Support of sql-92 select statement


"Fred Prose" <fprose@hotmail.com> wrote in message
news:195a4770.0311190822.49fa561b@posting.google.c om...
> We've been given the SQL source code for an application written to
> sql-92 standards. Some of the syntax looks like this:
>
> select
> c_count,
> count(*) as custdist
> from
> (
> select


FROM TABLE(MULTISET(SELECT ...))

or something like that.

You have to tell Informix that a) a select statement is a bag,
and b) you can make a table from it.










Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 08:34 PM
Andreas Weininger
 
Posts: n/a
Default Re: Support of sql-92 select statement

XPS is supporting this syntax.

Andreas

Fred Prose wrote:
> We've been given the SQL source code for an application written to
> sql-92 standards. Some of the syntax looks like this:
>
> select
> c_count,
> count(*) as custdist
> from
> (
> select
> c_custkey,
> count(o_orderkey)
> from
> customer left outer join orders on
> c_custkey = o_custkey
> and o_comment not like
> '%express%deposits%'
> group by
> c_custkey
> ) as c_orders (c_custkey, c_count)
> group by
> c_count
> order by
> custdist desc,
> c_count desc;
>
> Correct me if I'm wrong, but I don't see that IDS 9.x supports this?
>
> Fred Prose
> Arizona Supreme Court



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 11:10 AM.


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