RE: pls/sql help please

From: Stephens, Chris <>
Date: Thu, 28 Jan 2010 13:08:19 -0600
Message-ID: <>

DB_ADMIN_at_reddb> create table t(col1 varchar2(5));

Table created.

DB_ADMIN_at_reddb> insert into t(col1) values('abc'||chr(9));

1 row created.

DB_ADMIN_at_reddb> select dump(col1) from t;


Typ=1 Len=4: 97,98,99,9

DB_ADMIN_at_reddb> update t set col1 = substr(col1,1,length(col1) - 1);

1 row updated.

DB_ADMIN_at_reddb> select dump(col1) from t;


Typ=1 Len=3: 97,98,99

I think that works.


DB_ADMIN_at_reddb> update t set col1 = replace(col1,chr(9));

1 row updated.

DB_ADMIN_at_reddb> select dump(col1) from t;


Typ=1 Len=3: 97,98,99

If you just want to get rid of all the tabs.

From: [] On Behalf Of Eugene Pipko Sent: Thursday, January 28, 2010 12:37 PM To: ''
Subject: pls/sql help please

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?

Eugene Pipko
Seattle Pacific Industries
office: 253.872.5243
cell: 206.304.7726
P Please consider the environment before printing this e-mail

This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by email reply.

Received on Thu Jan 28 2010 - 13:08:19 CST

Original text of this message