Unix Technical Forum

Re: Whatcha' wanta have?????

This is a discussion on Re: Whatcha' wanta have????? within the Informix forums, part of the Database Server Software category; --> Yes, I like Chris's suggestion. For example, in PostgreSQL, I can do the following: postgres=# select * from ddd; ...


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, 09:22 PM
Dorn Bhechsonggram
 
Posts: n/a
Default Re: Whatcha' wanta have?????


Yes, I like Chris's suggestion.

For example, in PostgreSQL, I can do the following:

postgres=# select * from ddd;
call_date_time | in_trunk
----------------------------+----------
2004-02-10 17:10:47.95334 | 25
2004-02-10 17:10:53.111503 | 32
2004-02-10 17:10:57.444058 | 100

postgres=# select * from dddd order by 1 DESC;
call_date_time1 | call_date_time2
----------------------------+-------------------------------
2004-02-10 17:10:47.95334 | 2004-02-10 17:10:47.95334-08
2004-02-07 23:27:30.365545 | 2004-02-07 23:27:30.365545-08
(2 rows)

postgres=# select * from ddd where call_date_time in (select call_date_time1
from dddd order by 1 DESC limit 1);
call_date_time | in_trunk
---------------------------+----------
2004-02-10 17:10:47.95334 | 25
(1 row)

Regards,
Dorn.

----- Original Message -----
From: "Chris Hall" <Chris.Hall@orbisuk.com>
To: <informix-list@iiug.org>
Sent: Friday, February 13, 2004 07:30 AM
Subject: Re: Whatcha' wanta have?????


> jleffler@us.ibm.com (Jonathan Leffler) wrote in message

news:<eab66e61.0402121022.7f9e03d2@posting.google. com>...
> > "Dirk Moolman" <DirkM@mxgroup.co.za> wrote:
> > > This makes me think of another simple thing:
> > >
> > > Increasing the capability of: select first n * from tablename
> > >
> > > ..... the capability of selecting subsets of data without too much

trouble
> >
> > Can you explain what you're thinking of? What do you want that Dorn
> > Bhechsonggram's suggestion does not provide? Or where do you want to
> > use the notation that you can't in PostgreSQL and MySQL?
> >
> > Thanks for the extra information.
> >
> > And thanks for the valuable ideas you're all submitting. No promises,
> > of course, but we're definitely taking notes.
> >
> > -=JL=-

>
> being able to use "first N" in any select, e.g.
>
> select * from table_1 where key in (select first 10 key from table_2
> order by something);
>
> select first N * from table_1 into temp table_temp;
>
> etc...
>



sending to informix-list


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:59 AM.


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