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

x
?
Solved

SQL*Loader for Insert.

Posted on 2004-10-29
8
Medium Priority
?
2,016 Views
Last Modified: 2007-12-19
How can I build do an SQL* Loader to do an insert in the TBRECEIPTS table.



 RC_PAYMNB number(10)  RC_CASHNB Number(8) RC_DATE Varchar2(19)
 ----------                         ----------                            -------------------
 42884297                         888888                             10-10-2004

 RC_DATA Vachar2(2500)
 -------
     T S T T        

IND.SQUARE/EDWARD ST

VAT REG# 100476     

Bill Payment  2004/07/1            1.00

Account:   91013698-0000                

      Chantal Rigaud                    

A/c Balance:  2,534.33                  

                                       

                                       

TOTAL                              1.00

                                       

TENDERED                                

 Cash                     1.00          

    TOTAL TENDERED                 1.00

                                       

CHANGE                             0.00

                                       

Payment No:   42884297 Cashier:  888888

           18-Oct-2004 09:12            

IF YOU NEED TO KNOW 

HOW MUCH YOU OWE !  

CALL 800-BILL (2455)
















0
Comment
Question by:mathieu_cupryk
  • 6
8 Comments
 
LVL 9

Expert Comment

by:pratikroy
ID: 12450756
Is your datafile a fixed length/delimited file ?
0
 

Author Comment

by:mathieu_cupryk
ID: 12450762
I do not have a data file. I just did a select. I cannot do an insert with RC_DATA field because of <CR> or the square boxes
0
 

Author Comment

by:mathieu_cupryk
ID: 12450786
SP2-0734: unknown command beginning "IND.SQUAR..." - rest of line ignored.
SP2-0734: unknown command beginning "VAT REG# ..." - rest of line ignored.
SP2-0734: unknown command beginning "Bill Payme..." - rest of line ignored.
SP2-0734: unknown command beginning "Account:  ..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning "Chantal Ri..." - rest of line ignored.
  1* insert into TBRECEIPTS (RC_PAYMNB, RC_CASHNB, RC_DATE, RC_DATA) VALUES (42884297,888888,'10-10-2004',      T S T T        /c Balance:  2,534.33
SP2-0734: unknown command beginning "TOTAL     ..." - rest of line ignored.
SP2-0042: unknown command "TENDERED" - rest of line ignored.
SP2-0734: unknown command beginning "Cash      ..." - rest of line ignored.
SP2-0734: unknown command beginning "TOTAL TEND..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
  1* insert into TBRECEIPTS (RC_PAYMNB, RC_CASHNB, RC_DATE, RC_DATA) VALUES (42884297,888888,'10-10-2004',      T S T T        /c Balance:  2,53433
SP2-0734: unknown command beginning "Payment No..." - rest of line ignored.
SP2-0734: unknown command beginning "18-Oct-200..." - rest of line ignored.
SP2-0734: unknown command beginning "IF YOU NE..." - rest of line ignored.
SP2-0734: unknown command beginning "HOW MUCH ..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning "CALL 800-..." - rest of line ignored.
SP2-0042: unknown command "" - rest of line ignored.
SP2-0042: unknown command "')" - rest of line ignored.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:mathieu_cupryk
ID: 12450792
insert into TBRECEIPTS (RC_PAYMNB, RC_CASHNB, RC_DATE, RC_DATA) VALUES (42884297,888888,'10-10-2004',      T S T T        

IND.SQUARE/EDWARD ST

VAT REG# 100476     

Bill Payment  2004/07/1            1.00

Account:   91013698-0000                

      Chantal Rigaud                    

A/c Balance:  2,534.33                  

                                       

                                       

TOTAL                              1.00

                                       

TENDERED                                

 Cash                     1.00          

    TOTAL TENDERED                 1.00

                                       

CHANGE                             0.00

                                       

Payment No:   42884297 Cashier:  888888

           18-Oct-2004 09:12            

IF YOU NEED TO KNOW 

HOW MUCH YOU OWE !  

CALL 800-BILL (2455)
















');
0
 

Author Comment

by:mathieu_cupryk
ID: 12450797
insert into TBRECEIPTS (RC_PAYMNB, RC_CASHNB, RC_DATE, RC_DATA) VALUES (42884297,888888,'10-10-2004', '     T S T T        

IND.SQUARE/EDWARD ST

VAT REG# 100476     

Bill Payment  2004/07/1            1.00

Account:   91013698-0000                

      Chantal Rigaud                    

A/c Balance:  2,534.33                  

                                       

                                       

TOTAL                              1.00

                                       

TENDERED                                

 Cash                     1.00          

    TOTAL TENDERED                 1.00

                                       

CHANGE                             0.00

                                       

Payment No:   42884297 Cashier:  888888

           18-Oct-2004 09:12            

IF YOU NEED TO KNOW 

HOW MUCH YOU OWE !  

CALL 800-BILL (2455)
















');
0
 

Author Comment

by:mathieu_cupryk
ID: 12458118
T S T T        \n\nIND.SQUARE/EDWARD ST\n\nVAT REG# 100476     \n\nBill Payment  2004/07/1          100.00 \n\nAccount:   91013698-0000                \n\n      Chantal Rigaud                    \n\nA/c Balance:  2,566.33                  \n\n                                        \n\n                                        \n\nTOTAL                            100.00 \n\n                                        \n\nTENDERED                                \n\n Cash                   100.00          \n\n    TOTAL TENDERED               100.00 \n\n                                        \n\nCHANGE                             0.00 \n\n
Answered my own question.
0
 
LVL 1

Accepted Solution

by:
hanzpk earned 2000 total points
ID: 12460088
well, if still want the sqlloader answer...
below is the control file, and invoke something like = sqlldr user/password@db control=thisfile.ctl

control file
========
LOAD DATA
INFILE *
APPEND
INTO TABLE tbreceipts
FIELDS TERMINATED BY "@" OPTIONALLY ENCLOSED BY '"'
   (RC_PAYMNB,RC_CASHNB,RC_DATE, RC_DATA )
   BEGINDATA
42884297@888888@"10-10-2004"@     T S T T        

IND.SQUARE/EDWARD ST

VAT REG# 100476     

Bill Payment  2004/07/1            1.00

Account:   91013698-0000                

      Chantal Rigaud                    

A/c Balance:  2,534.33                  

                                       

                                       

TOTAL                              1.00

                                       

TENDERED                                

 Cash                     1.00          

    TOTAL TENDERED                 1.00

                                       

CHANGE                             0.00

                                       

Payment No:   42884297 Cashier:  888888

           18-Oct-2004 09:12            

IF YOU NEED TO KNOW 

HOW MUCH YOU OWE !  

CALL 800-BILL (2455)















0
 

Author Comment

by:mathieu_cupryk
ID: 12460103
Instead of using the square boxes I used \n
This I will try thanks. Looks good.:-)
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Suggested Courses
Course of the Month20 days, 4 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question