Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Collating sequence question?
Hemant Shah <shah_at_typhoon.xnet.com> wrote in message news:<bguc5d$dr0$1_at_flood.xnet.com>...
> Exmaple: If the partial key value is 'AAA' then I would like to fetch all the
> rows where the key is >= 'AAA0x000x000x000x000x000x000x00' and key <=
> '0xff0xff0xff0xff0xff0xff0xff0xff0xff0xff'
>
> I declare cursor as follows:
>
> EXEC SQL DECLARE LnamePat CURSOR FOR
> SELECT lname, rec FROM lidpown.mytable
> WHERE lname >= :TmpKey AND lname <= :HighValues
> ORDER BY NLSSORT(lname, 'NLS_SORT=BINARY');
>
>
> When I do a FETCH I get ORA-01403 error. There are records starting with
> AAA, and AAB in the table.
Hemant,
You literally assigned 'AAA0x000x000x000x000x000x000x00' to :TmpKey? I think you need to assign 'AAA' || chr(0) || chr(0)... instead.
Yong Huang Received on Fri Aug 08 2003 - 00:05:48 CDT