Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL*Loader question- Transforming Data
<SPAN
class=973012318-30072001>Dave,
<SPAN
class=973012318-30072001>
How
about
INTO TABLE PROJ
FIELDS TERMINATED BY "," OPTIONALLY
ENCLOSED BY '"'
WHEN <SPAN
class=973012318-30072001>FLAG_TXT != '<SPAN
class=973012318-30072001>yourstringhere'
(EMPNO<SPAN
class=973012318-30072001>, ENAME, FLAG<SPAN
class=973012318-30072001>_TXT)
Look
at the sample ULCASE5.ctl that is in the ORACLE_HOME\RDBMS\DEMO
directory.
<SPAN
class=973012318-30072001>
Looks
like it is something that would work for you.
Tom Mercadante <FONT face=Arial
size=2>Oracle Certified Professional
<FONT face=Tahoma
size=2>-----Original Message-----From: David Wagoner
[mailto:dwagoner_at_arsenaldigital.com]Sent: Monday, July 30, 2001
2:56 PMTo: Multiple recipients of list ORACLE-LSubject:
SQL*Loader question- Transforming Data
<FONT color=black face=Arial
size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">I’m
using SQL*Loader to populate a database table with transaction records.<SPAN
style="mso-spacerun: yes"> The data file contains some
transactions that I want to exclude from the load and they all contain the
same text string, something like “xxx,yyy,FLAG_TEXT,xxx,yyy”.<SPAN
style="mso-spacerun: yes"> Can I use a SQL statement in the
SQL*Loader control file to filter out those transactions?<SPAN
style="mso-spacerun: yes"> Something that functions like this
pseudocode:
<FONT color=black face=Arial
size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">
<FONT color=black face=Arial
size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">if
field like ‘%FLAG_TEXT%’ then null;
<FONT color=black face=Arial
size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">else
load;
<FONT color=black face=Arial
size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">
<FONT color=black face=Arial
size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">
<FONT color=black face=Arial
size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">I’ve
been reading the new Oracle SQL*Loader book by Gennick and Mishra which is a
good book, but I’m still uncertain about
this.
<FONT color=black face=Arial
size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">
<FONT color=black face=Arial
size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">
<FONT color=black face=Arial
size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Thanks,
<FONT color=black face=Arial
size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">
<span
style="mso-spacerun: yes"> AUTOTEXTLIST \s "E-mail
Signature" <FONT
color=blue face=Arial><SPAN
style="COLOR: blue; FONT-FAMILY: Arial; FONT-WEIGHT: bold">David B.
Wagoner
<SPAN
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; FONT-STYLE: italic; mso-bidi-font-size: 12.0pt">Database
Administrator<SPAN
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; FONT-STYLE: italic; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; FONT-WEIGHT: bold; mso-bidi-font-size: 12.0pt">Arsenal
Digital Solutions Worldwide Inc.<FONT color=black
face=Arial size=2><SPAN
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; FONT-WEIGHT: bold; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">4815
Emperor Blvd., Suite 110<FONT color=black face=Arial
size=2><SPAN
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Durham,
NC 27703<SPAN
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Tel.
(919) 941-4645<SPAN
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Fax
(919) 474-0695<SPAN
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Email
<FONT face="Times New Roman"
size=3><SPAN
style="FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt">mailto:dwagoner_at_arsenaldigital.com<FONT color=black face=Arial size=2><SPAN style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
style="FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt">http://www.arsenaldigital.com/<FONT color=black face=Arial size=2><SPAN style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"> <FONT color=black face=Arial size=2><SPAN style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
style="mso-spacerun: yes">*** NOTICE<SPAN
style="mso-spacerun: yes"> Thank you.<FONT color=black face=Arial size=1><SPAN style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 8pt; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
color=black> <FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext">Received on Mon Jul 30 2001 - 14:53:02 CDT
![]() |
![]() |