[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1883
  • Last Modified:

Command Prompt Error in Oracle SP2-0042 Unknown Command

I'm trying to create a control file in the command prompt, so I can load a flat file (tilde delimited) but I keep getting an error when the LOAD DATA command is invoked.  Here's the script and what am I doing wrong?

-- This is the SQL*Loader for  Items

LOAD DATA
INFILE      'Z:\JR Osuna\extracts_items tilda delimited\ITEMS_MFG.txt'
BADFILE     'Z:\JR Osuna\extracts_items tilda delimited\ITEMS_MFG.bad'
DISCARDFILE 'Z:\JR Osuna\extracts_items tilda delimited\ITEMS_MFG.dsc'
TRUNCATE
INTO TABLE trex_inv_items_mfg_copics_stg
FIELDS TERMINATED BY "~"
TRAILING NULLCOLS                                      
(
MITEM                 CHAR "TRIM(:MITEM        )",
MLLC                  CHAR "TRIM(:MLLC         )",
MRACN                  CHAR "TRIM(:MRACN        )",
MTYPN                  CHAR "TRIM(:MTYPN        )",
.....many more rows....
)

Thanks.

Joalkat
0
Joalkat
Asked:
Joalkat
1 Solution
 
MikeOM_DBACommented:

>> I'm trying to create a control file in the command prompt, ...
You create sql*loader control files with an OS editor NOT is sql*plus...
0
 
JoalkatAuthor Commented:
Thanks, it worked...
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Tackle projects and never again get stuck behind a technical roadblock.
Join Now