Why can't this work? (select first N into temp t1)
Posted in 2000
Topics: SQL Development & Query Writing, Platform-Specific Issues, Versions, Editions & End-of-Life
IDS 7.31 UC6 on Solaris hi all! SQL: select first N into temp temp1 I was wondering if someone could provide me a logical explanation as to why this isn't possible. I'm gettting a 944 error saying: "Cannot use "first" in this context. This statement uses FIRST N inside a subquery. This action is not supported. Review the use of FIRST N and check that it is applied only to the outer main query SELECT clause." Thanks, Lyzander ----------------------------------------------------------- Got questions? Get answers over the phone at Keen.com. Up to 100 minutes free! http://www.keen.com
Zandy wrote:
> IDS 7.31 UC6 on Solaris
>
> hi all!
>
> SQL: select first N into temp temp1
>
Hi,
I suppose N means a number.
Try
select first N * from table_1 ...
or
select first N col_1 from table_1
You have to specify the column[s] for the select.
It works fine with 7.31 and 9.21 (maybe 9.20 too).
>
> I was wondering if someone could provide me a logical
> explanation as to why this isn't possible.
>
> I'm gettting a 944 error saying:
>
> "Cannot use "first" in this context.
> This statement uses FIRST N inside a subquery. This action is
> not supported.
> Review the use of FIRST N and check that it is applied only to
> the outer main query SELECT clause."
>
> Thanks,
> Lyzander
>
> -----------------------------------------------------------
>
> Got questions? Get answers over the phone at Keen.com.
> Up to 100 minutes free!
> http://www.keen.com
--
Mit freundlichen Grüßen / with best regards :-)
+===================================Mail-Client: Netscape V4.73=+
| Ernst Sauerwein Siemens Busines Service |
| =============== IT Services ISC-D 144 |
| Microsoft Certified OLTP-Systems |
| Professional INFORMIX® Database Support |
| Tel: +49 89 3601 2699 Area South Europe |
| FAX: +49 89 3601 2402 Berliner Str.95,III/D046 |
| EMAIL: mailto:ernst.sauerwein@mch.siemens.de |
| FTP: ftp://ftp.siemens.de/ (external) |
| ftp://MB184060.mch.sni.de/ (internal) |
| WWW: http://its.mch.sni.de/ (external) |
| http://MB184060.mch.sni.de/ (internal) (v private) |
| http://www.stud.uni-muenchen.de/~yaling.mo/Welcome.htm |
+===============================================================+
Zandy wrote:
> IDS 7.31 UC6 on Solaris
>
> hi all!
>
> SQL: select first N into temp temp1
>
Hi,
I suppose N means a number.
Try
select first N * from table_1 ...
or
select first N col_1 from table_1
You have to specify the column[s] for the select.
It works fine with 7.31 and 9.21 (maybe 9.20 too).
>
> I was wondering if someone could provide me a logical
> explanation as to why this isn't possible.
>
> I'm gettting a 944 error saying:
>
> "Cannot use "first" in this context.
> This statement uses FIRST N inside a subquery. This action is
> not supported.
> Review the use of FIRST N and check that it is applied only to
> the outer main query SELECT clause."
>
> Thanks,
> Lyzander
>
> -----------------------------------------------------------
>
> Got questions? Get answers over the phone at Keen.com.
> Up to 100 minutes free!
> http://www.keen.com
--
Mit freundlichen Grüßen / with best regards :-)
+===================================Mail-Client: Netscape V4.73=+
| Ernst Sauerwein Siemens Busines Service |
| =============== IT Services ISC-D 144 |
| Microsoft Certified OLTP-Systems |
| Professional INFORMIX® Database Support |
| Tel: +49 89 3601 2699 Area South Europe |
| FAX: +49 89 3601 2402 Berliner Str.95,III/D046 |
| EMAIL: mailto:ernst.sauerwein@mch.siemens.de |
| FTP: ftp://ftp.siemens.de/ (external) |
| ftp://MB184060.mch.sni.de/ (internal) |
| WWW: http://its.mch.sni.de/ (external) |
| http://MB184060.mch.sni.de/ (internal) (v private) |
| http://www.stud.uni-muenchen.de/~yaling.mo/Welcome.htm |
+===============================================================+