SQL Loader Decimal Fields Trailing Signs
Date: Fri, 20 Oct 2000 18:46:32 GMT
Message-ID: <8sq3u6$jhi$1_at_nnrp1.deja.com>
[Quoted] I have hunted everywhere and have yet to find the answer. Can SQL Loader handle numeric fields with fixed decimal points and trailing signs? When the data is loaded using the control file below, all values are loaded as positive values.
Can I concatenate two fields in the control file and load them into one field?
[Quoted] FIELD4 POSITION(42:51) DECIMAL EXTERNAL "SUBSTR(:FIELD4, 51, 1) || SUBSTR(:FIELD4, 49, 9)" I haven't seen an example of this I just took a shot. I didn't get an error but I didn't get any data in the column either.
I really want to avoid loading the sign into a separate column on a temporary table and then writing a stored procedure to apply the sign when the data is moved to the final table.
My data file looks like this:
T0144444TEST PARENT
T024444411111TEST CHILD ONE88809/28/20000023.4567- T024444422222TEST CHILD TWO88809/28/20000023.4567- T024444433333TEST CHILD THR88809/28/20000023.4567-
My control file looks like this:
LOAD DATA
REPLACE
INTO TABLE DIS_TEST_1
WHEN (1:3)= 'T01'
(PARENT_KEY POSITION(4:8) CHAR,
FIELD1 POSITION(9:23) CHAR)
INTO TABLE DIS_TEST_2
WHEN (1:3) = 'T02'
(PARENT_KEY POSITION(4:8) CHAR,
CHILD_KEY POSITION(9:13) CHAR, FIELD1 POSITION(14:28) CHAR, FIELD2 POSITION(29:31) INTEGER EXTERNAL, FIELD3 POSITION(32:41) DATE 'MM/DD/YYYY', FIELD4 POSITION(42:51) DECIMAL EXTERNAL)
Thanks in advance
Lori
-- Bayer Corp West Haven, CT Sent via Deja.com http://www.deja.com/ Before you buy.Received on Fri Oct 20 2000 - 20:46:32 CEST