Path: newssvr20.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!newsfeed.stanford.edu!postnews1.google.com!not-for-mail
From: yong321@yahoo.com (Yong Huang)
Newsgroups: comp.databases.oracle.server
Subject: Re: Collating sequence question?
Date: 7 Aug 2003 22:05:48 -0700
Organization: http://groups.google.com/
Lines: 23
Message-ID: <b3cb12d6.0308072105.124ca72f@posting.google.com>
References: <bgtr8f$7e2$1@flood.xnet.com> <kh75jv4jgp01tq91cqk9pr0m30grbnpb19@4ax.com> <bguc5d$dr0$1@flood.xnet.com>
NNTP-Posting-Host: 64.63.207.11
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1060319149 12383 127.0.0.1 (8 Aug 2003 05:05:49 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 8 Aug 2003 05:05:49 GMT
Xref: newssvr20.news.prodigy.com comp.databases.oracle.server:240066

Hemant Shah <shah@typhoon.xnet.com> wrote in message news:<bguc5d$dr0$1@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
