Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL*Loader question- Transforming Data

RE: SQL*Loader question- Transforming Data

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Mon, 30 Jul 2001 12:53:02 -0700
Message-ID: <F001.0035936C.20010730115404@fatcity.com>

<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&#8217;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 &#8220;xxx,yyy,FLAG_TEXT,xxx,yyy&#8221;.<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 &#8216;%FLAG_TEXT%&#8217; 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&#8217;ve   been reading the new Oracle SQL*Loader book by Gennick and Mishra which is a   good book, but I&#8217;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">

<SPAN

  style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Web
<FONT face="Times New Roman"

  size=3><SPAN
  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">

<SPAN
  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">

<SPAN

  style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 8pt; mso-bidi-font-size: 12.0pt"><SPAN
  style="mso-spacerun: yes">                                                                                                          
  ***  NOTICE<SPAN
  style="mso-spacerun: yes">  ***<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">
<SPAN

  style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 8pt; mso-bidi-font-size: 12.0pt">This   e-mail message is confidential, intended only for the named recipient(s) above   and may contain information that is privileged, work product or exempt from   disclosure under applicable law. 
  If you have received this message in error, or are not the named   recipient(s), please immediately notify the sender at (919) 941-4645 and   delete this e-mail message from your computer.<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">

<FONT
  color=black> <FONT 
  color=black><SPAN 
  style="COLOR: black; mso-color-alt: windowtext">
Received on Mon Jul 30 2001 - 14:53:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US