How to refer/store  a vaue from csv file in control file

Hi,
Consider the following control file script.
Load data
infile 'suv.csv'
     append      into table mast_equipmnet_test
fields terminated by "," optionally enclosed by '"'     
TRAILING NULLCOLS
equipment_id,
sub_vehicle_type,
ebiz_carrier_no expression "(select ebiz_carrier_no from mast_carrier where carrier_id=?)",
licence_no,
equip_type,
ebiz_appown_no,
ebiz_equip_no sequence(1,1)
here is my csv file
CABNO,          SUBTYPE     CARRIER_ID               REG_NO,     VEHICLE_TYPE,          EBIZ_APPOWN_NO
6954,          SUMO,          SWAMY,                         6954,          SUV,                    228
9183,          SUMO,          SWAMY,                         9183,          SUV,                    228
3173,          QUALIS,          SWAMY,                         3173,          SUV,                    228
In my csv file i have carrier_ids which are string values in 3rd column.
for every carrier_id ,the corresponding ebiz_carrier_no(numeric value) is stored in a master table called "mast_carrier".
While loading the data i need to fetch the ebiz_carrier_no for each carrier_id from mast_carrier table .
but here i got strucked in the where clause of select statement.
I am not able to refer the carrier_id from csv file in where clause.
can any body tell me how to refere a value from csv file in the select statement of control file script.
cheers
RRK

Sorry..
"EXPRESSION" is not needed..
ebiz_carrier_no "(select ebiz_carrier_no
from mast_carrier
where carrier_id=:ebiz_carrier_no )",
<br>
<br>
"Tested" as
<br>
load data
infile *
into table t truncate
fields terminated by ','
(id,
name "(select ename from emp
                   where empno = :name)"
begindata
1,7900
2,7902
<br>
QL> select * from t;
       ID NAME
        1 JAMES
        2 FORD                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • How can i store the data from the list to MS-Access?

    Hi all,
    We all know that from alv it is possible to export data to Ms-excel or word or text file. Can anyone tell me how can i store the data from alv or reports to Ms-Access?
    Thanks in Advance,
    Abhijit

    Hi,
    If you want that without code, i suppose there is a option in MS-Access to import data from Excel, so you have to first export to excel and then import to Access.
    If you want to code it yourself then have a look at FM TABLE_EXPORT_TO_MSACCESS, as said in Exporting Data from R/3 to MS ACCESS
    You can also see the search results in SCN for [export data to MS-Access (45 Results)|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=exportdatato+MS-Access&cat=sdn_all].
    Regards
    Karthik D

  • How do i store a movie from iTunes on my iPhone 6 (not the cloud)?

    how do i store a movie from iTunes on my iPhone 6 (not the cloud)?

    Hello!
    Please see this manual Download past purchases - Apple Support

  • How do I get my photos from Elements 11 into a file folder.

    How do I get my photos from Elemtnts 11 into a file folder.  I am trying to use Blurb to make a travel book but because of the number of photos I have them in groups and want them to stay in groups for the book.  Unfortunately the photos in each grouping are all over the place and will be definitely difficult and time consuming to bring into Blurb.

    Thank you.  I tried this before I wrote the question as the photos had just disappeared!
      I was very nervous to try this again but did with some junk photos and after much trial and error - it worked!  I'm not a real pro as you can tell and appreciate your help.

  • How can I bulk delete songs from the playlist, if original file could not be found.

    I deleted the original files from the Library iTines. The songs are still in the playlist. How can I bulk delete songs from the playlist, if original file could not be found. Thank.

    Take a look at my FindTracks script. Download it and test it out on a few tracks first. Use the No option first time around to manually confirm each path that it wants to fix so you can see how it works. When you're happy it does what you want select a larger group of tracks to process automatically.
    tt2

  • Load data with SQL Loader link field between CSV file and Control File

    Hi all,
    in a SQL Loader control file, how do you specify link with field in CSV file and Control file?
    E.g. if I wat to import the record in table TEST (col1, col2, col3) with data in csv file BUT in different position. How to do this?
    FILE CSV (with variable position):
    test1;prova;pippo;Ferrari;
    xx;yy;hello;by;
    In the table TEST i want that col1 = 'prova' (xx),
    col2 = 'Ferrari' (yy)
    col3 = default N
    the others data in CSV file are ignored.
    so:
    load data
    infile 'TEST.CSV'
    into table TEST
    fields terminated by ';'
    col1 ?????,
    col2 ?????,
    col3 CONSTANT "N"
    Thanks,
    Attilio

    With '?' mark i mean " How i can link this COL1 with column in csv file ? "
    Attilio

  • Regard ora-01207: How Oracle judge file is more recent than control file - old control file

    ORA-00283: recovery session canceled due to errors
    ORA-01122: database file 2 failed verification check
    ORA-01110: data file 2: '/tmp/auxsys.dbf_rman'
    ORA-01207: file is more recent than control file - old control file
    How Oracle judge file is more recent than control file - old control file, then it thrown out error ora-01207.
    It must compare data file with control file, but what compare?

    Begin from the beginning.
    Did you do a RESTORE DATABASE ?
    Or did you selectively restore datafiles ?
    Strange datafile name --- looks like it could have been a DATAFILECOPY done using rman.
    It is a very bad idea to have a datafile in /tmp   On some OSs, /tmp may get cleared of files on a reboot.
    Hemant K Chitale

  • How to refer to enclosing instance from within the member class?

    Hi
    How to refer to the enclosing instance from within the member class?
    I have the following code :
    import java.awt.*;
    import java.awt.event.*;
    public class MyDialog extends Dialog
         public MyDialog(Frame fr,boolean modal)
              super(fr,modal);
              addWindowListener(new MyWindowAdapter());
         public void paint(Graphics g)
              g.drawString("Modal Dialogs are sometimes needed...",10,10);
         class MyWindowAdapter extends WindowAdapter
              public void windowClosing(WindowEvent evt)
                   //MyDialog.close(); // is this right?
    In the above code, how can I call the "close()" method of the "Dialog" class (which is the enclosing class) from the inner class?
    Thanks in advance.
    Senthil.

    Hi Senthil,
    You can directly call the outer class method. Otherwise use the following way MyDialog.this.close(); (But there is no close() method in Dialog!!)
    If this is not you expected, give me more details about problem.
    (Siva E.)

  • How to refer to another EJB from different root

    Hi ,
    Is there any way in JDeveloper to refer to EJB's from another context root ( Technically different application ) from the EJB's in the current context root. ? Am seeing a couple of ways, but looking for something better if possible
    1) Reuse the source code from the other application
    2) Define the other EJB as a Service, use a Service lookup to get the business intent of the service.
    Please advice !!

    Done.

  • How to refer to JNDI PROVIDER_URL from within Tomcat Web app

    Can anyone provide a clear description on how to refer to a "Provider_URL" relative to the web application root for which a Java Class resides within? My issue is as follows. I've looked through the JNDI tutorial and the Tomcat JNDI How-To's and I'm still unable to find a solution.
    I'll elaborate:
    I have a "PROVIDER_URL" class variable defined as:
    private String PROVIDER_URL = "file:/C:/development/MyProject/MyWebApplication/WEB-INF/properties";I initialize my JNDI context within the class:
    Properties properties = new Properties();
    properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory");
    properties.setProperty(Context.PROVIDER_URL, PROVIDER_URL);
    context = new InitialContext(properties);
    cpds = (ConnectionPoolDataSource) context.lookup(baseName);
    ...The above example works fine. My question is given my web app's directory, how do I refer to "MyWebApplication/WEB-INF/properties" in a relative manner so that if I move my web application to a different server, the directory path does not affect my deployment and I dont have to hardcode the current path? Does this need to occur in the "server.xml" file? Can you provide a URL to an example?
    Your suggestions are appreciated...thanks.

    try to give
    http://localhost:8080
    or the app server based port address.

  • How to - extract query result set in CSV and make multiple files if result set is huge.

    I have a query which returns millions of rows. I need to extract those rows in CSV files. Having said that i want to keep these files under a limit of 500 MB . Result set can be distributed among multiples files but each file can not be > 500 MB in size.
    How to achieve this?

    You may use this standard! procedure from Blushadow and produce something useful for your need. https://community.oracle.com/message/6499123#6499123

  • How Can I stop Elements 7 from searching for a memory file?

    Recently, every time I turn on Elements 7 it starts searching for a missing file each time it encounters a photo with a "?" in the corner. I must have pressed a key somewhere to start this function but now I can't get it to stop. I can only continue to another photo if I press cancel while it is searching but I have to do this for each "?" marked picture. Is there any way of cancelling this feature? Thanks in anticipation.

    Two solutions:
    1. Uncheck the option Edit > Preferences > Files > Automatically Search For And Reconnect Missing Files.
    2. Either reconnect the missing files or delete them from the catalog, using the File > Reconnect > All Missing command.  See this FAQ for tips on how to use the command:
    http://www.johnrellis.com/psedbtool/photoshop-elements-faq.htm#_Quickly_reconnecting_large
    Leaving missing files in your catalog doesn't have any benefit.

  • How can we read some bytes from every line of the file

    How can we read some bytes from the every line of the file moving on to the next line
    without using the read line

    Actualiy readLine() takes more execution time
    for reading a part of line if we can do so without
    readLine() we can save some time...Well, if you knew, beforehand, the length of each line, you could use RandomAccessFile and its seek method, but, since you don't, you would have to read the rest of the line character-by-character, checking to see if it is a newline, in order to place the "cursor" at the beginning of the next line in order to read the next few characters you want.
    So, as you can see, you will need to read the entire line anyway (and if you do it yourself you also have to do the checking yourself considering all three possible end-of-line sequences), so you just as well use readLine().
    Some people may suggest Scanner and it's nextLine() method, but that also needs to read the rest of line (as evidenced by the fact that it returns it), so that is no different than the readLine() (or read it yourself) solution.

  • How to create a UML diagram from a existing .java/.class file?

    I want to create a UML diagram from a existing .java/.class file automatic in JDeveloper. Can I get it? thanks!

    create a new class diagram and then simply drag the java classes from your project onto the diagram area.

  • Drop a datafile from physical standby's control file

    Hi,
    I am trying to create a physical standby database for my production...
    1) I have taken cold backup of my primary database on 18-Nov-2013...
    2) I added a datafile on 19-nov-2013 ( 'O:\ORADATA\SFMS\SFMS_DATA4.DBF' )
    3) Standby control file was generated on 20-ov-2013 (today) after shutting down and then mounting the primary database...
    When i try to recover the newly setup standby using archive files, i am getting the following error (datafile added on 19th Nov is missing)
    SQL> recover standby database;
    ORA-00283: recovery session canceled due to errors
    ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    ORA-01157: cannot identify/lock data file 39 - see DBWR trace file
    ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    How to overcome this situation...
    Can i delete the entry for the newly added datafile from the backup control file ?
    When i tried to delete datafile using "alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF';", it is showing that database should be  open..
    SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    ERROR at line 1:
    ORA-01109: database not open
    SQL> show parameter STANDBY_FILE_MANAGEMENT
    NAME                                 TYPE        VALUE
    standby_file_management              string      AUTO
    SQL> alter system set STANDBY_FILE_MANAGEMENT=manual;
    System altered.
    SQL> show parameter STANDBY_FILE_MANAGEMENT
    NAME                                 TYPE        VALUE
    standby_file_management              string      MANUAL
    SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    ERROR at line 1:
    ORA-01109: database not open
    Regards,
    Jibu

    Jibu wrote:
    Hi,
    I am trying to create a physical standby database for my production...
    1) I have taken cold backup of my primary database on 18-Nov-2013...
    2) I added a datafile on 19-nov-2013 ( 'O:\ORADATA\SFMS\SFMS_DATA4.DBF' )
    3) Standby control file was generated on 20-ov-2013 (today) after shutting down and then mounting the primary database..
    Hi,
    What is your version?
    If you added new datafile or created new tablespace, take backup again for restore new created standby database.
    If your standby  database running well, DG configuration success, then this datafile will create on standby side, too.
    Set STANDBY_FILE_MANAGEMENT=AUTO best practice.
    When i try to recover the newly setup standby using archive files, i am getting the following error (datafile added on 19th Nov is missing)
    SQL> recover standby database;
    ORA-00283: recovery session canceled due to errors
    ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    ORA-01157: cannot identify/lock data file 39 - see DBWR trace file
    ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    How to overcome this situation...
    Can i delete the entry for the newly added datafile from the backup control file ?
    Not need any delete datafile from standby side, you must recreate standby database, or you can  take RMAN backup and restore to standby  side again.
    When i tried to delete datafile using "alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF';", it is showing that database should be  open..
    SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    ERROR at line 1:
    ORA-01109: database not open
    SQL> show parameter STANDBY_FILE_MANAGEMENT
    NAME                                 TYPE        VALUE
    standby_file_management              string      AUTO
    SQL> alter system set STANDBY_FILE_MANAGEMENT=manual;
    System altered.
    SQL> show parameter STANDBY_FILE_MANAGEMENT
    NAME                                 TYPE        VALUE
    standby_file_management              string      MANUAL
    SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    ERROR at line 1:
    ORA-01109: database not open
    It is not logical, Physical  standby must be bit-for-bit same with Primary  database.
    Regards
    Mahir M. Quluzade

Maybe you are looking for

  • SAP R/3

    I'm building a portal with coldfusion and mySQL. I need some data from a SAP R/3 database. The administrator of SAP is willing to export a text file each day with the data that I need so that I can import it into mySQL. I have no problem with this. T

  • After update, my pics in my photo albums look like crap!

    After updating, I notices my pictures in albums are blurry but not the pics on my camera roll! Is there a way to fix this becAuse I have pictures of my kids I show off everyday and now these precious memories are all blurry?

  • Import of .raw files in Aperture 3.2

    Hi, I recently bought a used Lumix DMC-FZ18 that support raw-format. I did some test photos today but have trouble imoprting them. When inserting the memorycard in my iMac with OS 10.7.2 all seems ok. I reply to the "import questions" and when import

  • Invoice

    Dear All, When I want to add AP Credit memo, the error message appears : "payment amount is greater than invoice amount", what could be the caused of the error message ? The invoice is closed and I want to create AP CM to the closed invoice by duplic

  • Terminating Java programs in UVa Online Judge

    Hi all. Pardon me if this post is a little off mark but then the UVa boards doesn't seem very active so... Over at UVa, some problems specify the end of input or the number of inputs (i.e., some problems say that, "Input will be terminated by the lin