RE: pls/sql help please
Date: Thu, 28 Jan 2010 11:51:46 -0800
Message-ID: <34DB87F47199374280ADFD2968CDBCFA88160347AB_at_MAIL01KT.seattlepacificindustries.com>
Michael,
I know for sure that the last character is TAB. I opened a file with Word and turned on formatting.
Eugene Pipko
Seattle Pacific Industries
office: 253.872.5243
cell: 206.304.7726
P Please consider the environment before printing this e-mail
From: Michael Moore [mailto:michaeljmoore_at_gmail.com]
Sent: Thursday, January 28, 2010 11:26 AM
To: Eugene Pipko
Cc: oracle-l_at_freelists.org
Subject: Re: pls/sql help please
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<mailto: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:51:46 CST