Home » Infrastructure » Unix » SQL*LOADER (Oracle9i)
SQL*LOADER [message #489537] Mon, 17 January 2011 07:06 Go to next message
ajaykumarkona
Messages: 399
Registered: August 2010
Senior Member
HI Experts,

We have a ksh file named ldr_empdelta.ksh and it is having the SQL*LOADER script as follows.

print "LOAD DATA"                                              > $WEDB_GEN/ldrscan.ctl
print "INFILE '"$LED_SCAN"/delta/led_del.dat'"           >> $WEDB_GEN/ldrparms.ctl
print "TRUNCATE"                                              >> $WEDB_GEN/ldrscan.ctl
print "PRESERVE BLANKS"                                       >> $WEDB_GEN/lldrscan.ctl
print "INTO TABLE MED_TABLE"                             >> $WEDB_GEN/ldrscan.ctl
print "(EMPNO                POSITION(001:008) CHAR," >> $WEDB_GEN/ldrscan.ctl
print "PROD                  POSITION(059:060) CHAR," >> $WEDB_GEN/ldrscan.ctl
print "SBPRD                 POSITION(061:062) CHAR," >> $WEDB_GEN/ldrscan.ctl
print "FAMILY_NM             POSITION(143:162) CHAR " >> $WEDB_GEN/ldrscan.ctl
print ")"


But now I want to modify the FAMILY_NAME while inserting data into the table.

I tried the following ,
print "FAMILY_NM  POSITION(143:162) CHAR "REPLACE(:family_nm,'^','''')"," >> $WEDB_GEN/ldrscan.ctl

but i eas getting the error .Please help me to resolve this.
Thanks in advance.

****************************************************
Begin script:  ldr_empdelta.ksh
****************************************************
             date:   Mon Jan 17 04:48:22 PST 2011
     parms values:



     parms number:   0
       process_id:   5537
parent_process_id:   4006
     wedb_env_file:
    wedb_path_file:

ldr_empdelta.ksh[135]: syntax error at line 171 : `(' unexpected
Re: SQL*LOADER [message #489543 is a reply to message #489537] Mon, 17 January 2011 07:22 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Change the " of PRINT to '.

Regards
Michel
Previous Topic: Unix shell scripting
Next Topic: Compatibility Versions
Goto Forum:
  


Current Time: Thu Nov 21 11:24:01 CST 2024