Home » RDBMS Server » Server Utilities » Very Urgent Help
Very Urgent Help [message #73822] Tue, 20 July 2004 02:15 Go to next message
pulkit
Messages: 18
Registered: April 2004
Junior Member
HI,

 

I am working on SQL Loader and writing a CTL file for transfering data from flat file.

It looks like

LOAD DATA
INFILE   '/trimsbld/users/hermes/test/in/d1.dat'
BADFILE '/trimsbld/users/hermes/test/reject/d1.bad'
DISCARDFILE '/trimsbld/users/hermes/test/disc/d1.disc'
DISCARDMAX 9999
APPEND
INTO TABLE ACH_DET_REP
WHEN Counter_of_details > '400'
TRAILING NULLCOLS
(
                Record_Type position(01:03),
                Branch_Num position(04:06),
                Cust_base position(07:12),
                Accnt_Num position(13:22),
                Counter_of_details position(125:127),
                Row_details position(128:3200)
)

Now this is giving me the following error

SQL*Loader-350: Syntax error at line 8.
Illegal combination of non-alphanumeric characters
WHEN Counter_of_details > '400'
                                  ^

What is the right way to use '>' sign.

I need this very urgently. Please let me know ifany one know about it. Please let me know about '<' and other signs also.

 

Thanks a lot in advance.

 

Regards

Pulkit

 

 

 

 

 

 
Re: Very Urgent Help [message #73825 is a reply to message #73822] Tue, 20 July 2004 03:40 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Can one selectively load only the records that one need?

Look at this example, (01) is the first character, (30:37) are characters 30 to 37:
LOAD DATA
INFILE 'mydata.dat' BADFILE 'mydata.bad' DISCARDFILE 'mydata.dis'
APPEND
INTO TABLE my_selective_table
WHEN (01) <> 'H' and (01) <> 'T' and (30:37) = '19991217'
(
region CONSTANT '31',
service_key POSITION(01:11) INTEGER EXTERNAL,
call_b_no POSITION(12:29) CHAR
)
Re: Very Urgent Help [message #73827 is a reply to message #73825] Tue, 20 July 2004 05:06 Go to previous message
pulkit
Messages: 18
Registered: April 2004
Junior Member
HI

Thanks for your reply. Well i need to check for greater or less values. In your example it will only check for !=

Please advise.

Regards
Pulkit
Previous Topic: How to compare two rows for values
Next Topic: Not able to start database.
Goto Forum:
  


Current Time: Mon Jul 01 10:01:57 CDT 2024