Microsoft
Software
Hardware
Network
Question : SQL*Loader - Trim Leading & Trailing Space for Columns with Spaces in Name
I have a table to load raw data into. The data is comma delimited and enclosed in tics (single quotes).
The user has asked that I trim the trailing spaces from the data. No problem.
The problem is that the vendor who created the table has put spaces in the column names. This has been addressed and will be corrected however for now, we need to get the data into the table.
I am embryonic in using SQL*Loader and can't seem to get the syntax down for the columns with spaces.
Here are the column names:
PIN
ID NUMBER
NAME
COMMENT CODE
The data looks like:
'000352','555 ','JACK ','06 a p q t '
'000888','888 ','JILL ','10 z i q t '
Here is my control file:
LOAD DATA
INFILE 'datafile.dat'
INTO TABLE customer
REPLACE
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY "'"
TRAILING NULLCOLS
(
PIN "LTRIM(RTRIM(:PIN))",
"ID NUMBER",
NAME "LTRIM(RTRIM(:NAME))",
"COMMENT CODE"
)
What syntax can I use to trim the "ID NUMBER" and "COMMENT CODE"?
Answer : SQL*Loader - Trim Leading & Trailing Space for Columns with Spaces in Name
Try creating a view on the table with column_names "col_x" instead of "col x"
and check if you can use the view instead of the table in sql-loader
Random Solutions
XP device manager error: Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)
Recover NTFS Data after Hard drive reformatted with Apple Time Machine
ORA-07445
Jquery Cycle Plugin Relative Div
Configure Shrew VPN client
Query Terminal Server via vbscript
trying to add a 24hour timer to my app
windows 7 drops terminal server connections
Proxy settings in Windows 7
dead transaction