Re: pls/sql help please
Date: Thu, 28 Jan 2010 11:26:24 -0800
Message-ID: <26fdee6e1001281126l6b146eb2td6fee3a5646da5c2_at_mail.gmail.com>
Since you are not showing the entire program it's hard to say what the problem is.
However, this might help you to figure it out: The point is, you can use DUMP to examine your string more carefully.
DECLARE
vsize_fieldin VARCHAR2( 120 ) := 'TECH' || CHR( 09 ); vsize_field VARCHAR2( 120 );BEGIN
SELECT DUMP( vsize_fieldin, 16 )
INTO vsize_field FROM DUAL;
DBMS_OUTPUT.put_line( TO_CHAR( vsize_field )); END; On Thu, Jan 28, 2010 at 10:36 AM, Eugene Pipko <eugene.pipko_at_unionbay.com>wrote:
> Hi all,
>
> I have the following line in the file in the text file being sent to me
> (just an example):
>
>
>
> x 16 18
> 20 22 24 <- tab (hidden)
>
>
>
> Very last character on that line is TAB character.
>
> I am trying to account for that, but for some reason can’t catch it:
>
>
>
> vSize_field := TRIM(SUBSTR(vLine,C_SIZE_FIELD_START,C_SIZE_FIELD_LEN));
>
> vSize_id := sc_get_size_fn(vSize_field,' ');
>
>
>
> WHILE ( vSize_field IS NOT NULL OR TRIM(vSize_field) <> ' ' OR
> TRIM(vSize_id) <> CHR(9) )
>
> LOOP
>
> -- store values in collection
>
> vNext_row := NVL(sc_size.LAST,0)+1;
>
> sc_size(vNext_row) := vSize_id;
>
>
>
> -- progress down the line
>
> C_SIZE_FIELD_START := C_SIZE_FIELD_START + C_SIZE_FIELD_LEN;
>
>
>
> -- retrieve current values
>
> vSize_field := TRIM(SUBSTR(vLine,C_SIZE_FIELD_START,C_SIZE_FIELD_LEN));
>
> vSize_id := sc_get_size_fn(vSize_field,' ');
>
>
>
> END LOOP;
>
>
>
> What am I missing?
>
> Thanks,
>
>
>
>
>
> Eugene Pipko
>
> Seattle Pacific Industries
>
> office: 253.872.5243
>
> cell: 206.304.7726
>
> P Please consider the environment before printing this e-mail
>
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Jan 28 2010 - 13:26:24 CST