Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Collating sequence question?

Re: Collating sequence question?

From: Hemant Shah <shah_at_typhoon.xnet.com>
Date: Mon, 11 Aug 2003 20:05:41 +0000 (UTC)
Message-ID: <bh8sul$p7u$2@flood.xnet.com>


While stranded on information super highway Yong Huang wrote:
:)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.

 No, each 0x00 represents a NULL character.

 for (i = strlen(Myvar); i < MAXLENGTH; i++)  {

    Myvar[i] = 0x00;
 }

:)
:)Yong Huang

-- 
Hemant Shah                           /"\  ASCII ribbon campaign
E-mail: NoJunkMailshah_at_xnet.com       \ /  --------------------- 
                                       X     against HTML mail
TO REPLY, REMOVE NoJunkMail           / \      and postings      
FROM MY E-MAIL ADDRESS.           
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind,                Above opinions are mine only.
it's backed up on tape somewhere.      Others can have their own.
Received on Mon Aug 11 2003 - 15:05:41 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US