Re: Update question

From: Feilone Tong <feilone_at_hotmail.com>
Date: Wed, 29 Sep 2004 23:28:17 +0800
Message-ID: <cjek6u$at52_at_imsp212.netvigator.com>


The select clause doesn't return the result as you are expecting. The "ORDER" logic is applied AFTER 10 records is retrieved from MY_TABLE.

So there is no way to use 1 simple SQL to complete your operation.

Wing

"Jul" <julia.sats_at_sympatico.ca> ¦b¶l¥ó news:Nr26d.4808$MD5.395214_at_news20.bellglobal.com ¤¤¼¶¼g...
> What wrong with such query:
>
> update MY_TABLE
> set FIELD_ONE = 'A'
> where FIELD_TWO in (select FIELD_TWO
> from MY_TABLE
> where rownum < 11
> order by FIELD_THREE )
>
> The query return such error:
> ORA-00907: missing right parenthesis
>
> I know that the problem because of the "order by" but why?
>
> And if I need to update only specify portion (for example first 10
records)
> what to do?
> I can use PL/SQL , cursor , but can I do using single query?
>
> Thanks
>
>
Received on Wed Sep 29 2004 - 17:28:17 CEST

Original text of this message