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; ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |