SQL loader - Zeros adding
Hi All,
My SQL loader is adding zeros into table. Please see below CTL file and Data
CTL :
Startdate DATE "MM/DD/YYYY"
File has data :
Startdate
03/04/12
04/05/12
07/03/12
Table data :
03/04/0012
04/05/0012
07/03/0012
My question is how can I avoid 00 's in my data.
Thanks,
Change your FORMAT MASK:
SQL> -- generating your sample data:
SQL> with t as (
2 select '03/04/12' startdate from dual union
3 select '04/05/12' from dual union
4 select '07/03/12' from dual
5 )
6 --
7 -- actual query:
8 --
9 select startdate
10 , to_date(startdate, 'mm/dd/yyyy') dt1
11 , to_date(startdate, 'mm/dd/yy') dt2
12 , to_date(startdate, 'mm/dd/rr') dt3
13 from t;
STARTDAT DT1 DT2 DT3
03/04/12 04-03-0012 00:00:00 04-03-2012 00:00:00 04-03-2012 00:00:00
04/05/12 05-04-0012 00:00:00 05-04-2012 00:00:00 05-04-2012 00:00:00
07/03/12 03-07-0012 00:00:00 03-07-2012 00:00:00 03-07-2012 00:00:00
SQL> Storing 2 digits for the YEAR part in a DATE column is sooooo 1970...
You can read/search the Oracle Documentation @ http://www.oracle.com/pls/db112/homepage
Similar Messages
-
SQL*Loader sqlldr removes zeros from character field
Hello,
I am using SQL*Loader to load an Oracle table, and am having a problem. One of the fields is defined as VARCHAR2 and contains comments entered by a user. There may be numbers or dollar amounts included in this text. When I execute the sqlldr script below, the result is that all of the zeros on the text field disappear. There is a translate function invoked for this field (bolded statement) in an attempt to remove imbedded newlines from the text. Wherever there was a zero in the original text, it ends up being removed after I run this script. Can anyone suggest why this is occurring, and how to prevent it? Can it be related to the translate function?
Thanks for your help!
OPTIONS (READSIZE=20971520, BINDSIZE=20971520, ROWS=20000)
LOAD DATA
INFILE 'R24.REGION.ERL.N1E104' "str X'5E5E220A'"
BADFILE 'LOGS/N1E104_BUT_RS_ASSGN_TXT_BADDATA.TXT'
DISCARDFILE 'LOGS/N1E104_BUT_RS_ASSGN_TXT_DISCARDDATA.TXT'
REPLACE
INTO TABLE TESTM8.CONV_BUT_RS_ASSGN_TXT
FIELDS TERMINATED BY '~' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
RST_RS_EXT_TXT_OID DECIMAL EXTERNAL,
RST_RS_ASSGN_OID DECIMAL EXTERNAL NULLIF RST_RS_ASSGN_OID = 'NULL',
RST_TXT_SEQ_NBR INTEGER EXTERNAL,
RST_RS_COMM_OID DECIMAL EXTERNAL,
RST_DIF_ASSGN_OID DECIMAL EXTERNAL NULLIF RST_DIF_ASSGN_OID = 'NULL',
RST_EXTENDED_TXT "SUBSTR(TRANSLATE(:RST_EXTENDED_TXT, '#0x0A', '#'), 1, 248)"
--------------------------------------------Never mind, found my mistake. In the TRANSLATE function, I had assumed that the 0x0A would be interpreted as a single hex value. Instead, it is interpreted literally as the character '0', the character 'x', the character 'A', etc. The result is that the transformed text had no '0', 'x', or 'A' characters, which is exactly what I inadvertently told it to do. I changed it to the following, which works better ;-)
RST_EXTENDED_TXT "SUBSTR(TRANSLATE(:RST_EXTENDED_TXT, '#'||CHR(10), '#'), 1, 250)" -
SQL Loader is creating a log file of 0 (zero) bytes.
Hello!!
I am using SQL Loader to load data from a .txt file to a Oracle table.
Following is the control file:
LOAD DATA
CHARACTERSET UTF8
CONTINUEIF LAST != "|"
INTO TABLE product_review_dtl
FIELDS TERMINATED BY '||' TRAILING NULLCOLS
indiv_review_id INTEGER EXTERNAL,
pid INTEGER EXTERNAL,
merchant_review_id INTEGER EXTERNAL,
merchant_user_id CHAR "SUBSTR(:merchant_user_id,1,20)",
review_status_txt CHAR "SUBSTR(:review_status_txt,1,20)",
review_create_date DATE "YYYY-MM-DD",
helpful_votes_cnt INTEGER EXTERNAL,
not_helpful_votes_cnt INTEGER EXTERNAL,
review_source_txt CHAR "SUBSTR(:review_source_txt,1,30)",
overall_rating_num INTEGER EXTERNAL,
comment_txt CHAR(4000) "SUBSTR(:comment_txt,1,4000)",
nickname CHAR "SUBSTR(:nickname,1,30)",
headline_txt CHAR "SUBSTR(:headline_txt,1,100)",
confirmed_status_grp INTEGER EXTERNAL "TO_NUMBER(SUBSTR(TO_CHAR(:confirmed_status_grp),1,5))",
location_txt CHAR "SUBSTR(:location_txt,1,100)"
Some records are loaded. A log file is also created but it is empty. Can you help me find out why the log file is empty?user525235 wrote:
Hello Folks!!
I have 2 input files with different encoding (apparent in case of special characters).
File 1 loads successfully. For File 2 loader gives a memory fault while loading. Hence the log file is of 0 bytes. I still have no clue as to why is the loader giving a memory fault. It is not an OS level memory fault as analysed by the OS team. Please help!
Thanks in advance :)Unknown OS
Unknown database version
No details about what import command was used or the options specified
No samples / details of input files or their encoding
No details about exact error message of "memory fault"
No help is possible ;-)
Srini -
SQL Loader - adding column values
Hi everybody,
Is it possible to have a column value in SQL Loader control file that is a function of two other columns. For example I have table of 3 columns c1, c2, c3
and data file is having c1, c2 and I want to specify c3 as c1+c2 in the control file, so that it's populated in the table while loading data file. I tried this on date column but it gave me error ora-00981.
Can you tell me exact sysntax if possible.LOAD DATA
INFILE 'C:\SQLLOADER\AREA.TXT'
APPEND INTO TABLE AREA
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
(c1,
c2,
c3 ":c2+:c1"
kuljeet pal singh -
Adding sql loader into 11g Client already installed
I have already installed Oracle 11g client and need to add in sql loader. How is that best accomplished?
Easier than I thought. Just go back into the previous oracle client home install and the preinstalled items will be greyed out. Just add additional components you want to install.
-
SQL* Loader - Multi-line record problem
Hi all,
I've been given a ver dirty source file. One that has records of more than 1 line. The only record terminator that is available is that the first columns should always be in number in 7 digits (0000000-9999999). Is it possible to create a control file that checks if the current record is actually a new record or if it is just a continuation of the previous record?
I've been checking on some parameters like the CONTINUEIF and the "str terminator_string".
I tried both but neither fully satisfies the requirements.
I tried using CONTINUEIF by adding CONTINUEIF THIS (1) = '0' to check if it only creates records that has a column value starting with '0'. Unfortunately it still adds those that doesn't start with '0'.
Also tried the INFILE 'mydata.dat' "str '\r\n0'". This works for those who starts with 0 only but unfortunately it trims out the first zero (0) from that column.
Can someone suggest any other approach?
Thanks.
Allenhi,
thanks for the suggestion. i did try it. it works ok but i also found a way to use sql loader since this is better performance wise. i used
CONTINUEIF NEXT PRESERVE (8) <> X'09'.
basically, what this does is check if the character on the 8th position is a tab. if it is, then it's a new line. i used this since the first column in my text file uses a 7 digit number. it's not perfect but loads fast. although i'm still looking for some other ways and means.
thanks again. -
Hello,
I'm trying to use sql-loader with parallel option.
I have loaded data with and without parellel but it takes same time. I don't appreciatte a better perfomance with parallel.
In the called to sqlldr i'm adding PARALLEL=TRUE. That is the only change i have made.
Do i have to make any 'alter table' with my Oracle table??.
Any advice will be greatly appreciatted.
NaujThe PARALLEL=TRUE parameter will not, by itself, result in any performance gain at all. It is really just a flag which tells SQL*Loader to allow multiple sessions to perform direct loads at the same time. It is up to you to actually spawn multiple SQL*Loader sessions on different portions of the data (e.g. you might divide your source data into multiple files and run distinct SQL*Loader sessions on each file concurrently)
-
Sql*loader and sequence() for primary keys
I have a question regarding SQL*Loader with the sequence() function and using it for a primary key to load records in multiple tables from one input record. I am pulling data from a delimited file and populating several tables from each row. For the primary key, I am using the sequence function.
For the first table (the parent), I use sequence(40000,1) for the key. Since the remaining inserts are based on the same logical record, I use sequence(40000,1) for those too (one record for each month). The problem comes in when a child record does not pass a WHEN clause (the amount is zero). Then it almost seems as if the parent record is not loaded and the child (or children) that does pass the WHEN clause are assigned to the next parent! Obviously, the sequence is getting out of sync between the children and the parent.
I've looked in the documentation and tried several different ways to attack this problem. Is there a bug in SQLLDR (8.1.7) or is it just my coding.
I will try to include the files below but they are very large.
Thanks for your help.
Dan
***CONTROL FILE***
LOAD DATA
INFILE 'rent.csv'
INTO TABLE BUDGET_LINE
append
WHEN TOT_AMT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER CHAR,
SPEND FILLER CHAR,
ACCOUNT FILLER CHAR,
TOT_AMT FILLER CHAR,
JAN_AMT FILLER CHAR,
JAN_CNT FILLER CHAR,
FEB_AMT FILLER CHAR,
FEB_CNT FILLER CHAR,
MAR_AMT FILLER CHAR,
MAR_CNT FILLER CHAR,
APR_AMT FILLER CHAR,
APR_CNT FILLER CHAR,
MAY_AMT FILLER CHAR,
MAY_CNT FILLER CHAR,
JUN_AMT FILLER CHAR,
JUN_CNT FILLER CHAR,
JUL_AMT FILLER CHAR,
JUL_CNT FILLER CHAR,
AUG_AMT FILLER CHAR,
AUG_CNT FILLER CHAR,
SEP_AMT FILLER CHAR,
SEP_CNT FILLER CHAR,
OCT_AMT FILLER CHAR,
OCT_CNT FILLER CHAR,
NOV_AMT FILLER CHAR,
NOV_CNT FILLER CHAR,
DEC_AMT FILLER CHAR,
DEC_CNT FILLER CHAR,
CUT FILLER CHAR,
NETMANGEN FILLER CHAR,
NETMAN_item BOUNDFILLER CHAR,
NETMAN_item_seq BOUNDFILLER CHAR,
NETMAN_location BOUNDFILLER CHAR,
UPDATED_ON DATE "MM/DD/YYYY",
NETMAN_com_desc BOUNDFILLER CHAR,
NETMAN_vendor BOUNDFILLER CHAR,
NETMAN_generation BOUNDFILLER CHAR,
CREATED_ON SYSDATE,
CREATED_BY CONSTANT '0',
UPDATED_BY CONSTANT '0',
ACTIVE CONSTANT 'T',
GL_CODE_COMBO_ID CONSTANT '0',
BUDGET_TYPE CONSTANT 'B',
AMOUNT_TYPE CONSTANT 'D',
source constant 'N',
BUDGET_LINE_ID SEQUENCE(40000,1),
DESCRIPTION "(:NETMAN_item)||'-'||(:NETMAN_item_seq)||'; '||:NETMAN_com_desc||'; '||:NETMAN_vendor||' ('||:NETMAN_generation||')'"
INTO TABLE GL_CODE_TEMP
append
WHEN TOT_AMT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER POSITION(1) CHAR TERMINATED BY ',',
BUDGET_LINE_ID SEQUENCE(40000,1),
SPENDER CHAR ,
ACCT CHAR ,
TOT_AMT FILLER CHAR
INTO TABLE BUDGET_COST
append
WHEN AMOUNT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER POSITION(1) CHAR TERMINATED BY ',',
BUDGET_LINE_ID SEQUENCE(40000,1),
PERIOD_ID CONSTANT '1',
SPEND FILLER CHAR,
ACCOUNT FILLER CHAR,
TOT_AMT FILLER CHAR,
AMOUNT CHAR
INTO TABLE BUDGET_COST
append
WHEN AMOUNT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER POSITION(1) CHAR TERMINATED BY ',',
BUDGET_LINE_ID SEQUENCE(40000,1),
PERIOD_ID CONSTANT '2',
SPEND FILLER CHAR,
ACCOUNT FILLER CHAR,
TOT_AMT FILLER CHAR,
JAN_AMT FILLER CHAR,
JAN_CNT FILLER CHAR,
AMOUNT CHAR
INTO TABLE BUDGET_COST
append
WHEN AMOUNT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER POSITION(1) CHAR TERMINATED BY ',',
BUDGET_LINE_ID SEQUENCE(40000,1),
PERIOD_ID CONSTANT '3',
SPEND FILLER CHAR,
ACCOUNT FILLER CHAR,
TOT_AMT FILLER CHAR,
JAN_AMT FILLER CHAR,
JAN_CNT FILLER CHAR,
FEB_AMT FILLER CHAR,
FEB_CNT FILLER CHAR,
AMOUNT CHAR
INTO TABLE BUDGET_COST
append
WHEN AMOUNT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER POSITION(1) CHAR TERMINATED BY ',',
BUDGET_LINE_ID SEQUENCE(40000,1),
PERIOD_ID CONSTANT '4',
SPEND FILLER CHAR,
ACCOUNT FILLER CHAR,
TOT_AMT FILLER CHAR,
JAN_AMT FILLER CHAR,
JAN_CNT FILLER CHAR,
FEB_AMT FILLER CHAR,
FEB_CNT FILLER CHAR,
MAR_AMT FILLER CHAR,
MAR_CNT FILLER CHAR,
AMOUNT CHAR
INTO TABLE BUDGET_COST
append
WHEN AMOUNT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER POSITION(1) CHAR TERMINATED BY ',',
BUDGET_LINE_ID SEQUENCE(40000,1),
PERIOD_ID CONSTANT '5',
SPEND FILLER CHAR,
ACCOUNT FILLER CHAR,
TOT_AMT FILLER CHAR,
JAN_AMT FILLER CHAR,
JAN_CNT FILLER CHAR,
FEB_AMT FILLER CHAR,
FEB_CNT FILLER CHAR,
MAR_AMT FILLER CHAR,
MAR_CNT FILLER CHAR,
APR_AMT FILLER CHAR,
APR_CNT FILLER CHAR,
AMOUNT CHAR
INTO TABLE BUDGET_COST
append
WHEN AMOUNT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER POSITION(1) CHAR TERMINATED BY ',',
BUDGET_LINE_ID SEQUENCE(40000,1),
PERIOD_ID CONSTANT '6',
SPEND FILLER CHAR,
ACCOUNT FILLER CHAR,
TOT_AMT FILLER CHAR,
JAN_AMT FILLER CHAR,
JAN_CNT FILLER CHAR,
FEB_AMT FILLER CHAR,
FEB_CNT FILLER CHAR,
MAR_AMT FILLER CHAR,
MAR_CNT FILLER CHAR,
APR_AMT FILLER CHAR,
APR_CNT FILLER CHAR,
MAY_AMT FILLER CHAR,
MAY_CNT FILLER CHAR,
AMOUNT CHAR
INTO TABLE BUDGET_COST
append
WHEN AMOUNT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER POSITION(1) CHAR TERMINATED BY ',',
BUDGET_LINE_ID SEQUENCE(40000,1),
PERIOD_ID CONSTANT '7',
SPEND FILLER CHAR,
ACCOUNT FILLER CHAR,
TOT_AMT FILLER CHAR,
JAN_AMT FILLER CHAR,
JAN_CNT FILLER CHAR,
FEB_AMT FILLER CHAR,
FEB_CNT FILLER CHAR,
MAR_AMT FILLER CHAR,
MAR_CNT FILLER CHAR,
APR_AMT FILLER CHAR,
APR_CNT FILLER CHAR,
MAY_AMT FILLER CHAR,
MAY_CNT FILLER CHAR,
JUN_AMT FILLER CHAR,
JUN_CNT FILLER CHAR,
AMOUNT CHAR
INTO TABLE BUDGET_COST
append
WHEN AMOUNT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER POSITION(1) CHAR TERMINATED BY ',',
BUDGET_LINE_ID SEQUENCE(40000,1),
PERIOD_ID CONSTANT '8',
SPEND FILLER CHAR,
ACCOUNT FILLER CHAR,
TOT_AMT FILLER CHAR,
JAN_AMT FILLER CHAR,
JAN_CNT FILLER CHAR,
FEB_AMT FILLER CHAR,
FEB_CNT FILLER CHAR,
MAR_AMT FILLER CHAR,
MAR_CNT FILLER CHAR,
APR_AMT FILLER CHAR,
APR_CNT FILLER CHAR,
MAY_AMT FILLER CHAR,
MAY_CNT FILLER CHAR,
JUN_AMT FILLER CHAR,
JUN_CNT FILLER CHAR,
JUL_AMT FILLER CHAR,
JUL_CNT FILLER CHAR,
AMOUNT CHAR
INTO TABLE BUDGET_COST
append
WHEN AMOUNT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER POSITION(1) CHAR TERMINATED BY ',',
BUDGET_LINE_ID SEQUENCE(40000,1),
PERIOD_ID CONSTANT '9',
SPEND FILLER CHAR,
ACCOUNT FILLER CHAR,
TOT_AMT FILLER CHAR,
JAN_AMT FILLER CHAR,
JAN_CNT FILLER CHAR,
FEB_AMT FILLER CHAR,
FEB_CNT FILLER CHAR,
MAR_AMT FILLER CHAR,
MAR_CNT FILLER CHAR,
APR_AMT FILLER CHAR,
APR_CNT FILLER CHAR,
MAY_AMT FILLER CHAR,
MAY_CNT FILLER CHAR,
JUN_AMT FILLER CHAR,
JUN_CNT FILLER CHAR,
JUL_AMT FILLER CHAR,
JUL_CNT FILLER CHAR,
AUG_AMT FILLER CHAR,
AUG_CNT FILLER CHAR,
AMOUNT CHAR
INTO TABLE BUDGET_COST
append
WHEN AMOUNT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER POSITION(1) CHAR TERMINATED BY ',',
BUDGET_LINE_ID SEQUENCE(40000,1),
PERIOD_ID CONSTANT '10',
SPEND FILLER CHAR,
ACCOUNT FILLER CHAR,
TOT_AMT FILLER CHAR,
JAN_AMT FILLER CHAR,
JAN_CNT FILLER CHAR,
FEB_AMT FILLER CHAR,
FEB_CNT FILLER CHAR,
MAR_AMT FILLER CHAR,
MAR_CNT FILLER CHAR,
APR_AMT FILLER CHAR,
APR_CNT FILLER CHAR,
MAY_AMT FILLER CHAR,
MAY_CNT FILLER CHAR,
JUN_AMT FILLER CHAR,
JUN_CNT FILLER CHAR,
JUL_AMT FILLER CHAR,
JUL_CNT FILLER CHAR,
AUG_AMT FILLER CHAR,
AUG_CNT FILLER CHAR,
SEP_AMT FILLER CHAR,
SEP_CNT FILLER CHAR,
AMOUNT CHAR
INTO TABLE BUDGET_COST
append
WHEN AMOUNT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER POSITION(1) CHAR TERMINATED BY ',',
BUDGET_LINE_ID SEQUENCE(40000,1),
PERIOD_ID CONSTANT '11',
SPEND FILLER CHAR,
ACCOUNT FILLER CHAR,
TOT_AMT FILLER CHAR,
JAN_AMT FILLER CHAR,
JAN_CNT FILLER CHAR,
FEB_AMT FILLER CHAR,
FEB_CNT FILLER CHAR,
MAR_AMT FILLER CHAR,
MAR_CNT FILLER CHAR,
APR_AMT FILLER CHAR,
APR_CNT FILLER CHAR,
MAY_AMT FILLER CHAR,
MAY_CNT FILLER CHAR,
JUN_AMT FILLER CHAR,
JUN_CNT FILLER CHAR,
JUL_AMT FILLER CHAR,
JUL_CNT FILLER CHAR,
AUG_AMT FILLER CHAR,
AUG_CNT FILLER CHAR,
SEP_AMT FILLER CHAR,
SEP_CNT FILLER CHAR,
OCT_AMT FILLER CHAR,
OCT_CNT FILLER CHAR,
AMOUNT CHAR
INTO TABLE BUDGET_COST
append
WHEN AMOUNT != '0'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
NETMAN_ITEM_NO FILLER POSITION(1) CHAR TERMINATED BY ',',
BUDGET_LINE_ID SEQUENCE(40000,1),
PERIOD_ID CONSTANT '12',
SPEND FILLER CHAR,
ACCOUNT FILLER CHAR,
TOT_AMT FILLER CHAR,
JAN_AMT FILLER CHAR,
JAN_CNT FILLER CHAR,
FEB_AMT FILLER CHAR,
FEB_CNT FILLER CHAR,
MAR_AMT FILLER CHAR,
MAR_CNT FILLER CHAR,
APR_AMT FILLER CHAR,
APR_CNT FILLER CHAR,
MAY_AMT FILLER CHAR,
MAY_CNT FILLER CHAR,
JUN_AMT FILLER CHAR,
JUN_CNT FILLER CHAR,
JUL_AMT FILLER CHAR,
JUL_CNT FILLER CHAR,
AUG_AMT FILLER CHAR,
AUG_CNT FILLER CHAR,
SEP_AMT FILLER CHAR,
SEP_CNT FILLER CHAR,
OCT_AMT FILLER CHAR,
OCT_CNT FILLER CHAR,
NOV_AMT FILLER CHAR,
NOV_CNT FILLER CHAR,
AMOUNT CHAR
*** PIECE OF DATA FILE ***
Item,Spender,Account,Total Amt,Jan Amt,Jan Count,Feb Amt,Feb Count,Mar Amt,Mar Count,Apr Amt,Apr Count,May Amt,May Count,Jun Amt,Jun Count,Jul Amt,Jul Count,Aug Amt,Aug Count,Sep Amt,Sep Count,Oct Amt,Oct Count,Nov Amt,Nov Count,Dec Amt,Dec Count,Status,Netman Gen,Netman Item,Netman Unit,Location,Last Update Date,Component Description,Vendor Description,Generation Process
10110993,10993,8301-01,90134,7480,0,7480,0,7480,0,7480,0,7480,0,7480,0,7480,0,7480,0,7480,0,7480,0,7667,0,7667,0,0,+,LEASE PYMT,207,WIMOS,5/22/2002,LEASE PAYMENTS,"VIKING HOLDING, INC.",ACTUAL BUDGET
10410993,10993,8301-04,15240,1270,0,1270,0,1270,0,1270,0,1270,0,1270,0,1270,0,1270,0,1270,0,1270,0,1270,0,1270,0,0,+,JANITORIAL,58,WIMOS,5/22/2002,JANITORIAL,BUILDING ONE SVC SOLUTION,ACTUAL BUDGET
10810993,10993,8301-08,2232,186,0,186,0,186,0,186,0,186,0,186,0,186,0,186,0,186,0,186,0,186,0,186,0,0,+,ELECTRIC,77,WIMOS,5/22/2002,"UTILITIES (GAS,ELEC.,ETC)",WISCONSIN PUBLIC SERVICE,AVGD 01 04 07 10 NOT WEIGHTED
10910993,10993,8301-09,4220,26,0,348,0,609,0,383,0,348,0,371,0,348,0,371,0,360,0,348,0,360,0,348,0,0,+,FIRE EQUIP,51,WIMOS,5/22/2002,RENT CONTRACT SERVICES,"CENTRALCOM, INC.",ACTUAL EXPERIENCE
11610993,10993,8301-16,1272,106,0,106,0,106,0,106,0,106,0,106,0,106,0,106,0,106,0,106,0,106,0,106,0,0,+,L/H MOSINE,1,WIMOS,5/22/2002,LEASEHOLD IMPROVEMENTS,ELLIS STONE,ACTUAL BUDGET
10110994,10994,8301-01,69960,5830,0,5830,0,5830,0,5830,0,5830,0,5830,0,5830,0,5830,0,5830,0,5830,0,5830,0,5830,0,0,+,LEASE PYMT,228,WISTEWEL,5/22/2002,LEASE PAYMENTS,BJ INVESTMENTS LLC,ACTUAL BUDGET
10410994,10994,8301-04,840,70,0,70,0,70,0,70,0,70,0,70,0,70,0,70,0,70,0,70,0,70,0,70,0,0,+,JANITORIAL,69,WISTEWEL,5/22/2002,JANITORIAL,MARSDEN,ACTUAL BUDGET
10710994,10994,8301-07,6067,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6067,0,0,+,LEASE PYMT,228,WISTEWEL,5/22/2002,LEASE PAYMENTS,BJ INVESTMENTS LLC,ASSUME 5% INCREASE OVER ACTUAL 2000 EXPENSES
10810994,10994,8301-08,2460,205,0,205,0,205,0,205,0,205,0,205,0,205,0,205,0,205,0,205,0,205,0,205,0,0,+,ELECTRIC,84,WISTEWEL,5/22/2002,"UTILITIES (GAS,ELEC.,ETC)",BJ INVESTMENTS LLC,AVGD 03 06 09 NOT WEIGHTED
10910994,10994,8301-09,1050,70,0,70,0,105,0,105,0,70,0,105,0,35,0,140,0,35,0,70,0,210,0,35,0,0,+,SANITATION,12,WISTEWEL,5/22/2002,RENT CONTRACT SERVICES,WASTE MANAGEMENT OF WIS,ACTUAL EXPERIENCE
11910994,10994,8301-19,1099,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1099,0,0,0,0,0,0,0,0,0,0,+,INSURANCE,6,WISTEWEL,5/22/2002,INSURANCE,BJ INVESTMENTS LLC,ACTUAL EXPERIENCE
10110998,10998,8301-01,2440,2440,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+,LEASE PYMT,47,ILELG,5/22/2002,LEASE PAYMENTS,ELGIN AIRPORT BUSINESS PK,ACTUAL BUDGET
10410998,10998,8301-04,146,146,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+,LEASE PYMT,47,ILELG,5/22/2002,LEASE PAYMENTS,ELGIN AIRPORT BUSINESS PK,ACTUAL BUDGET
10610998,10998,8301-06,336,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,0,+,DRINK H2O,46,ILELG,5/22/2002,COOLER AND BOTTLED WATER,"HINCKLEY & SCHMITT, INC.",AVGD 01 02 03 04 05 06 07 08 09 10
10710998,10998,8301-07,276,276,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+,LEASE PYMT,47,ILELG,5/22/2002,LEASE PAYMENTS,ELGIN AIRPORT BUSINESS PK,ASSUME 5% INCREASE OVER ACTUAL 2000 EXPENSES
10810998,10998,8301-08,3108,433,0,315,0,234,0,173,0,181,0,292,0,320,0,337,0,316,0,153,0,183,0,171,0,0,+,ELECTRIC,20,ILELG,5/22/2002,"UTILITIES (GAS,ELEC.,ETC)",COMMONWEALTH EDISON,AVGD 01 02 03 04 05 06 07 08 09 10 WEIGHTED
*** SCRIPT FOR TABLES LOADED ***
CREATE TABLE BUDGET_LINE (
BUDGET_LINE_ID NUMBER NOT NULL,
BUDGET_TYPE CHAR (1) NOT NULL,
GL_CODE_COMBO_ID NUMBER NOT NULL,
AMOUNT_TYPE CHAR (1) NOT NULL,
ACTIVE CHAR (1) DEFAULT 'T' NOT NULL,
SOURCE CHAR (1),
CUT CHAR (1),
DESCRIPTION VARCHAR2 (180),
CAP_ITEM_ID NUMBER,
PBT_ID NUMBER,
BILL_ID NUMBER,
CREATED_ON DATE DEFAULT SYSDATE NOT NULL,
CREATED_BY NUMBER NOT NULL,
UPDATED_ON DATE DEFAULT SYSDATE NOT NULL,
UPDATED_BY NUMBER NOT NULL,
CHECK (ACTIVE IN ('T','F') ) ,
CHECK (CUT IN ('C',NULL) ),
CONSTRAINT BUDGET_LINE_PRI
PRIMARY KEY ( BUDGET_LINE_ID ) ) ;
CREATE TABLE BUDGET_COST (
BUDGET_LINE_ID NUMBER NOT NULL,
PERIOD_ID NUMBER NOT NULL,
AMOUNT NUMBER (13,2),
CONSTRAINT BUDGET_COST_PRI
PRIMARY KEY ( BUDGET_LINE_ID, PERIOD_ID ) ) ;
CREATE TABLE GL_CODE_TEMP (
BUDGET_LINE_ID NUMBER NOT NULL,
SPENDER CHAR (5),
ACCT CHAR (7),
GL_CODE_COMBO_ID NUMBER,
CONSTRAINT GL_CODE_TEMP_BDGT_ID
PRIMARY KEY ( BUDGET_LINE_ID ) ) ;Thanks for the reply .. user do have their user credentials but only for the application ... but all users use a common loader and control file once they log into the application. So irrespective of which user is logged in he selects the same control file and loads to the same table mentioned in the control file .. i instead want user to be able to load to the table in control file but into his schema like username.tablename instead of just the tablename mentioned in .ctl file.
-
SQL Loader and foreign characters in the data file problem
Hello,
I have run into an issue which I can't find an answer for. When I run SQL Loader, one of my control files is used to get file content (LOBFILE) and one of the fields in the data file has a path to that file. The control file looks like:
LOAD DATA
INFILE 'PLACE_HOLDER.dat'
INTO TABLE iceberg.rpt_document_core APPEND
FIELDS TERMINATED BY ','
doc_core_id "iceberg.seq_rpt_document_core.nextval",
-- created_date POSITION(1) date "yyyy-mm-dd:hh24:mi:ss",
created_date date "yyyy-mm-dd:hh24:mi:ss",
document_size,
hash,
body_format,
is_generic_doc,
is_legacy_doc,
external_filename FILLER char(275) ENCLOSED by '"',
body LOBFILE(external_filename) terminated by EOF
A sample data file looks like:
0,2012-10-22:10:09:35,21,BB51344DD2127002118E286A197ECD4A,text,N,N,"E:\tmp\misc_files\index_testers\foreign\شیمیایی.txt"
0,2012-10-22:10:09:35,17,CF85BE76B1E20704180534E19D363CF8,text,N,N,"E:\tmp\misc_files\index_testers\foreign\ลอบวางระเบิด.txt"
0,2012-10-22:10:09:35,23552,47DB382558D69F170227AA18179FD0F0,binary,N,N,"E:\tmp\misc_files\index_testers\foreign\leesburgis_á_ñ_é_í_ó_ú_¿_¡_ü_99.doc"
0,2012-10-22:10:09:35,17,83FCA0377445B60CE422DE8994900A79,binary,N,N,"E:\tmp\misc_files\index_testers\foreign\làm thế nào bạn làm ngày hôm nay"
The problem is that whan I run this, SQL Loader throws an error that it can't find the file. It appears that it can't interpret the foreign characters in a way that allows it to find that path. I have tried adding a CHARACTERSET (using AL32UTF8 or UTF8) value in the control file but that only has some success with Western languages, not the ones listed above. Also, there is no set of defined languages that could be found in the data file. It essentaially could be any language.
Does anyone know if there is a way to somehow get SQL Loader to "understand" the file system paths when a folder and/or file name could be in some other langauge?
Thanks for any thoughts - PeterThanks for the reply Harry. If I try to open the file in various text editors like Wordpad, Notepad, GVIM, andTextpad, they all display the foreign characters differently. Only Notepad comes close to displaying the characters properly. I have a C# app that will read the file and display the contents and it renders it fine. If you look at the directory of files in Windows Explorer, they all are displayed properly. So it seems things like .Net and Windows have some mechanism to understand the characters in order to render them properly. Other applications, again like Wordpad, do not know how to render them properly. It would seem that whatever SQL Loader is using to "read" the data files also is not rendering the characters properly which prevents it from finding the directory path to the file. If I add "CHARACTERSET AL32UTF8" in the control file, all is fine when dealing with Western langauges (ex, German, Spanish) but not for the Eastern languages (ex. Thai, Chinese). So .... telling SQL Loader to use a characterset seems to work, but not in all cases. The AL32UTF8 is the characterset that the Oracle database was created with. I have not had any luck if I try to set the CHARACTERSET to whatever the Thai character set is, for example. There problem there though is that even if that did work, I can't target specific lagauages because the data could come from anywhere. It's like I need some sort of global "super set" characterset to use. It seems like the CHARACTERSET is the right track to follow but I am not sure, and even if it is, is there a way to handle all languages.
Thanks - Peter -
hi,
I want to insert 100,000 records daily in a table for the first month and then in next month these records are going to be replaced by new updated records.
there might be few addition and deletion in the previous records also.
actually its consumer data so there might be few consumer who have withdrawn the utility and there will be some more consumer added in the database.
but almost 99% of the previous month data have to be updated/replaced with the fresh month data.
For instance, what i have in my mind is that i will use sql loader to load data for the first month and then i will delete the previous data using sqlPlus and load the fresh month data using sql loader again.
1. Is this ok ? or there is some better solution to this.
2. I have heard of external files, are they feasible in my scenario?
3. I have planned that i will make scripts for sqlPlus and Loader and use them in batch files. (OS windows 2003 server, Oracle 9i database). is there some better choice to make all the procedure automatic?
looking for your suggestions
nadeem ameerI would suggest u use External tables since its more flexible then
sqlloader & is a better option.
For using external tables
1)u will have to create a directory first
2)Generally creation od directory is done by sys,hence after creating the directory
privileges read & write to be provided to user .
3)Creation of external tables.
4) Now use the table as a normal table to insert ,update delete in
ur table.
U can get more information from
http://www.oracle-base.com/articles/9i/SQLNewFeatures9i.php#ExternalTables
Create Directory <directory_name> as <Directory path where file be present>
Grant read,write on directory <directory_name> to <username>
CREATE TABLE <table_name>
(<column names>)
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY ,directory_name>
ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
LOCATION (<filename>)
PARALLEL 5
REJECT LIMIT 200;
Hope this helps. -
SQL*Loader : ORA-19007 with missing Schema Location Hint
Hi,
These days I'm stuck with a 10.1.0.4 database (OS Linux Red Hat), and I'm trying to find a workaround for the following situation :
XML schema (sfgtest.xsd)
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xdb="http://xmlns.oracle.com/xdb">
<xs:element name="Code" xdb:SQLName="Code" xdb:SQLType="VARCHAR2">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="16"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Val" xdb:SQLType="NUMBER" xdb:SQLName="Val">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:totalDigits value="12"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Chq">
<xs:complexType xdb:SQLType="SFG_CHQ_TYPE">
<xs:sequence>
<xs:element ref="Code"/>
<xs:element ref="Val"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="NbRem" xdb:SQLType="NUMBER" xdb:SQLName="NbRem">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:totalDigits value="5"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Rmbt" xdb:defaultTable="TEST_XML_SFG">
<xs:complexType xdb:SQLType="SFG_RMBT_TYPE">
<xs:sequence>
<xs:element ref="NbRem"/>
<xs:element ref="Rem" maxOccurs="unbounded" xdb:SQLCollType="SFG_REM_COLL"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CodeAff" xdb:SQLName="CodeAff" xdb:SQLType="VARCHAR2">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="12"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Rem" xdb:SQLName="Rem">
<xs:complexType xdb:SQLType="SFG_REM_TYPE">
<xs:sequence>
<xs:element ref="CodeAff"/>
<xs:element ref="Chq" maxOccurs="unbounded" xdb:SQLCollType="SFG_CHQ_COLL"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Sample document (sfgtest.xml)
<?xml version="1.0" encoding="iso-8859-1"?>
<Rmbt>
<NbRem>3</NbRem>
<Rem>
<CodeAff>AFF001</CodeAff>
<Chq><Code>X01001</Code><Val>10.00</Val></Chq>
<Chq><Code>X01002</Code><Val>10.00</Val></Chq>
<Chq><Code>X01003</Code><Val>10.00</Val></Chq>
</Rem>
<Rem>
<CodeAff>AFF002</CodeAff>
<Chq><Code>X02001</Code><Val>10.00</Val></Chq>
<Chq><Code>X02002</Code><Val>10.00</Val></Chq>
<Chq><Code>X02003</Code><Val>10.00</Val></Chq>
</Rem>
<Rem>
<CodeAff>AFF003</CodeAff>
<Chq><Code>X03001</Code><Val>10.00</Val></Chq>
<Chq><Code>X03002</Code><Val>10.00</Val></Chq>
<Chq><Code>X03003</Code><Val>10.00</Val></Chq>
<Chq><Code>X03004</Code><Val>10.00</Val></Chq>
<Chq><Code>X03005</Code><Val>10.00</Val></Chq>
</Rem>
</Rmbt>
Schema registration
begin
dbms_xmlschema.registerSchema(
schemaURL => 'sfgtest.xsd',
schemaDoc => xmltype(bfilename('DUMP_DIR','sfgtest.xsd'),nls_charset_id('AL32UTF8')),
local => true,
genTypes => true,
genTables => false
end;
Table creation
create table test_xml_sfg of xmltype
xmltype store as object relational
xmlschema "sfgtest.xsd"
element "Rmbt"
varray xmldata."Rem" store as table test_xml_sfg_rem_tab
( primary key (NESTED_TABLE_ID, ARRAY_INDEX) ) organization index overflow
varray "Chq" store as table test_xml_sfg_chq_tab
( primary key (NESTED_TABLE_ID, ARRAY_INDEX) ) organization index overflow
);I originally wanted to use SQL*Loader to test performance, as I may have to load multiple files in the same time.
It works great on 10gR2 and 11gR2 with XML files up to 100 MB loaded in a matter of minutes.
However, a little issue with 10gR1 :
SQLLDR control file
LOAD DATA
INFILE 'filelist.txt'
APPEND
INTO TABLE test_xml_sfg
XMLTYPE(XMLDATA) (
filename filler char(260),
XMLDATA LOBFILE(filename) TERMINATED BY EOF
)with filelist.txt :
sfgtest.xmlExecution throws "ORA-19007: Schema - does not match expected sfgtest.xsd".
As per the documentation, it's expected behaviour in 10.1 :
http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10790/xdb03usg.htm#BABECCBG
The XML document must include the appropriate attributes from the XMLSchema-instance namespace or the XML document must be explicitly associated with the XML schema using the XMLType constructor or the createSchemaBasedXML() method.Also as expected, the file is loaded OK after adding the following in the root element :
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="sfgtest.xsd"But, as I don't have any latitude on the files received (i.e. I can't add the location hint), is there some workaround, when using SQL*Loader, to treat the XML file as an instance document?
Thanks for any solution/idea.Not sure if it will work, but out of the top of my head I would make an attempt to create an view (for update) based on the XMLType table and do the insert via the view, matching the incoming XML doc to the schema via
xmltype(xml_messsage).createSchemaBasedXML(xml_schema) -
Sql Loader - Decimal numbers showing in null column
Greetings,
My apologies if this is in the wrong forum section. It seemed to be the most logical.
I have added new column to a control file used in a sql loader upload and I am getting unexpected results. Long story short, I copy foxpro tables from a network directory to my local pc. A foxpro exe converts these tables to .dat files. Sql loader then uploads the .dat files to matching oracle tables. I've run this program from my pc for years with no problems.
Problem now: We added a new column to a foxpro table and to the matching oracle table. This column in FoxPro in null for now - no data at all. I then added the new column to my ctl file for this table. The program runs, sql loader does it's thing with no errors. However, in the new field in Oracle, I'm finding decimal numbers in many of the records, when all records should have null values in this field. I've checked all other columns in the oracle table and the data looks accurate. I'm not sure why I'm getting these decimal values in the new column.
My log and bad files show no hints of any problems. The bad file is empty for this table.
At first I thought the positioning of the new column in the fox table, .ctl file and the oracle table were not lining up correctly, but I checked and they are.
I've double checked the FoxPro table and all records for this new column are null.
I'm not sure what to check for next or what to test. I am hoping someone in this forum might lend a clue or has maybe seen this problem before. Below is my control file. The new column is the last one: fromweb_id. It is a number field in both FoxPro and Oracle.
Thanks for any advise.
JOBS table control file:
load data
infile 'convdata\fp_ora\JOBS.dat' "str X'08'"
into table JOBS
fields terminated by X'07'
TRAILING NULLCOLS
(SID,
CO_NAME "replace(replace(:CO_NAME,chr(11),chr(10)),chr(15),chr(13))",
JOB_TITLE "replace(replace(:JOB_TITLE,chr(11),chr(10)),chr(15),chr(13))",
CREDITS,
EARN_DATE date "mm/dd/yyyy",
COMMENTS CHAR(2000) "replace(replace(:COMMENTS,chr(11),chr(10)),chr(15),chr(13))",
DONT_SHOW,
PC_SRC "replace(replace(:PC_SRC,chr(11),chr(10)),chr(15),chr(13))",
PC_SRC_NO,
SALARY,
SALFOR,
ROOM,
BOARD,
TIPS,
UPD_DATE date "mm/dd/yyyy hh12:mi:ss am",
STUKEY,
JOBKEY,
JO_COKEY,
JO_CNKEY,
JO_ZUKEY,
EMPLID,
CN_NAME "replace(replace(:CN_NAME,chr(11),chr(10)),chr(15),chr(13))",
JOB_START date "mm/dd/yyyy",
JOB_END date "mm/dd/yyyy",
FROMWEB_ID)I apologize for not explaining how this was resolved. Sql Loader was working as it should.
The problem was due to new fields being added to the FoxPro table, along with the fromweb_id column, that I was not informed about. I was asked to add a column named fromweb_id to the oracle jobs table and to the sql-loader program. I was not told that there were other columns added at the same time. In the foxpro table, the fromweb_id column was the last column added.
The jobs.dat file contained data from all columns in the foxpro table, including all the new columns. I only added the "fromweb_id" to the control file, which is what I was asked to do. When it ran, it was getting values from one of the new columns and the values were being uploaded into the fromweb_id column in Oracle. It is that simple.
When I had checked the FoxPro table earlier, I did not pickup on the other new columns. I was focussing in on looking for values in the fromweb_id column. When back-tracing data in the jobs.dat file, I found a value in the fromweb_id column that matched a value in a differnt column (new column) in FoxPro. That is when I realized the other new columns. I instantly knew what the problem was.
Thanks for all the feedback. I'm sorry if this was an inconvenience to anyone. I'll try to dig a little deeper next time. Lessons learned...
regards, -
SQL*Loader-350: Illegal combination of non-alphanumeric characters
Hi all,
how to skip a column in control file.
i.e.
I have a table with 10 columns and FAT file contains 11 columns.
how to skip a last column ?
and
I added extra column to Table and I changed the control file too.
but i am getting error.
SQL*Loader-350: Syntax error at line 115.
Illegal combination of non-alphanumeric characters
thanks in Advance.Tom Kyte has an elaborate solution on his page:
http://osi.oracle.com/~tkyte/SkipCols/index.html
Or post the table description and the control file, so we can have a look at it. -
Ssis issue - load recent added 5 flat files
HI
i have one query like i have 5 flat files in one folder today i loaded into sql server table,tomorrow again added 5 flat files in same folder.i want to load recent added 5 flat files,
can any one give me answer?You need to have a loop and inside it have a step to check for file modified date for getting the recent files. Much better is if filename has timestamp part use that to determine the latest files
see example here
http://visakhm.blogspot.in/2012/05/package-to-implement-daily-processing.html
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
SQL*Loader issue with NULLIF
Hi all,
I am trying to use following control file,
LOAD DATA
INFILE *
REPLACE
INTO TABLE T1
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS
OBJECT_NAME CHAR NULLIF OBJECT_NAME = "NULL" ,
SUBOBJECT_NAME CHAR NULLIF SUBOBJECT_NAME = "NULL" ,
OBJECT_ID DECIMAL EXTERNAL NULLIF OBJECT_ID = "NULL" ,
DATA_OBJECT_ID DECIMAL EXTERNAL NULLIF DATA_OBJECT_ID = "NULL" ,
OBJECT_TYPE CHAR NULLIF OBJECT_TYPE = "NULL" ,
CREATED DATE "DD/MM/YYYY HH24:MI:SS" NULLIF CREATED = "NULL" ,
LAST_DDL_TIME DATE "DD/MM/YYYY HH24:MI:SS" NULLIF LAST_DDL_TIME = "NULL" ,
TIMESTAMP CHAR NULLIF TIMESTAMP = "NULL" ,
STATUS CHAR NULLIF STATUS = "NULL" ,
TEMPORARY CHAR NULLIF TEMPORARY = "NULL" ,
GENERATED CHAR NULLIF GENERATED = "NULL" ,
SECONDARY CHAR NULLIF SECONDARY = "NULL"
)I am getting error,
SQL*Loader-350: Syntax error at line 21.
Expecting positive integer or column name, found keyword timestamp.
CHAR NULLIF TIMESTAMP = "NULL" ,
STATUSThe file I am trying to load is a pipe delimited file and has a string "NULL" for NULL values. So, I have added NULLIF for all columns.
Interesting thing is, Oracle allows us to have column names like TIMESTAMP or GENERATED, but I use it in the NULLIF clause, it is effectively syntax error.
The table I am using is like this (it is same as user_objects view),
SQL> desc t1
Name Null? Type
OBJECT_NAME VARCHAR2(128)
SUBOBJECT_NAME VARCHAR2(30)
OBJECT_ID NUMBER
DATA_OBJECT_ID NUMBER
OBJECT_TYPE VARCHAR2(19)
CREATED DATE
LAST_DDL_TIME DATE
TIMESTAMP VARCHAR2(19)
STATUS VARCHAR2(7)
TEMPORARY VARCHAR2(1)
GENERATED VARCHAR2(1)
SECONDARY VARCHAR2(1)If I remove the NULLIF clause for columns, timestamp and generated, there is no problem, the control file works fine.
How can I get around this problem ?
Thanks in advanceTIMESTAMP is a keyword for the loader and confuses it.
rename your column
Maybe you are looking for
-
In my list of contacts I have entered a wrong address. I was able to erase it from that list BUT when I send an email it still appears on the list there and I cannt erase it. What shall I do ?
-
How can i enter network info on apple tv without remote
HELP! I was trying to change my dns number to get American netflix in Canada. I thought I had done everything right, was heading back to check out that it was working and accidently pressed enter too many times. I told my apple tv to forget my netwo
-
Cost distribution within the group companies
Hi Experts , Need your thoughts on what would be the best approach for the scenario explained below : We have a parent company and three other companies within the group. In total 4 company codes. There are some expenses which are booked under parent
-
Hi, My IMac Superdrive has gone bust and i need to re-install Adobe CS5.5 design premium middle east version. I have the original version DVD with me. But i am unable to install. Can i create an USB installation drive from the DVD or can you p
-
Hi Everybody, I am making forms based on procedures in 9iAS Portal. I am using two parameters for the form. One is Item Code for which I am having a simple LOV with sql statement. Other LOV has a dynamic Sql statement which accepts the Item_code as p