SQL*Loader - How to combine Flat File 3 columns and put into one single column

Receive a flat file delimited by comma. Want to combine Flat File last 3 columns and put into one single column(Table).
e.g.
Flat File
100,239,30,20,30
While inserting into table want to combine last 3 columns and insert into invoice number column.
302030

It is not possible to combine the last 3 columns as those columns are seperated by commas and in the SQL Loader control file you must ve specified COMMA as an delimiter. So u better have all the columns in the table plus add one more column which holds the concatenation of the 3 columns.
Vijay

Similar Messages

  • How to concatenate two colums into one single column

    I need some ideas to concatenate two different columns into one single column using a set of distinct values.
    For Example,
    Customer Product Number
    xyz A 1
    xyz B 2
    xyz B 1
    AAA C 7
    AAA A 1
    The result should look like this,
    Customer Value
    xyz A1 B2 B1
    AAA C7 A1
    How would I group this into once value ?
    Thanks in advance ...

    Tom's discussion of writing your own aggregate routines
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:2196162600402
    starts off with a link to the 8i alternatives
    "see
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:229614022562
    for 8i methods (not aggregates)"
    Unforutnately, it's a lot more work in 8i.
    Justin

  • How do I join multiple (short) audio clips into one single long audio clip in Premiere Pro CS5?

    Hello,
    The question is in the title but I'm wondering how I can join multiple (short) audio clips into one single long audio clip in PP CS5.5.  I put all my short clips right next to each other and selected all of them to see what options are available by right clicking and using the toolbar options at the top.  The closest that I got was to nest the sequence, but that's not what I really want.
    I'd like to merge all the short clips into one single (long) audio file to use under the video.
    Thoughts are welcome and  greatly appreciated.
    Thanks,
    -Melvin

    O.K. This is kind of fundamental and you will need to learn up on this fully ...but for now...
    Make sure you have the WAB ( work area bar )covering the length of the audio clips. ( You do not need to select them)
    Go to the File Menu> Export Media
    You will be given all the Export Options.  Choose Wave File
    Select option for Export Work Area.
    Choose where to export the file to ( HD location)
    follow your nose from there....
    http://tv.adobe.com/watch/learn-premiere-pro-cs5/exporting-with-adobe-media-encoder/
    BTW - Why are you taking the audio to Audition anyway? What are you going to do to it.

  • How to combine multiple fact tables and dimensions in one worksheet?

    Hello Forum,
    I am encountering a reporting problem when trying to create a worksheet that uses more than one cube/fact table and common dimensions. I have used Oracle Warehouse Builder 10Gr2 to design and deploy a pretty simple ROLAP data mart. We are using Discoverer Plus for OLAP as our reporting tool. We have 5 dimension tables using a star schema and 3 fact tables, when I create the worksheet I bring in our sales measure from our sales item table and then Store_Name from my Stores Dimension and then day from my time dimension, everything looks good at the stage, we're just trying to get a sum of all sales for that store on that day. Then I bring in a measure from our advertising cost table and a join window pops up asking which join to use, if I choose either the Store or the Time dimension I get correct data for the first fact table (sales) and grossly incorrect data for the ad cost measure from the second fact table (advertsing costs)...... any help would be appreciated

    You have encountered one of the key limitations of Discoverer... which I complained about to the Discoverer product manager at OpenWorld in 2001....
    Anyhow, to get around this, you are going to have to deal with it either in the database, (views, materialized views, tables), or within the admin tool by creating a custom folder.
    Discoverer also calls this the "fan trap", but never really had a solution to the problem. [The solution only worked is you joined to one and only one dimension!]
    What you want (using Sales_Fact and Inventory_Fact as an example) is to join Sales to Time, Store, and Product, and save that result. Then join Inventory to Time, Store, and Product, save that result, then do a double outer join between the two intermediate temporary tables in order to calculate something useful like inventory turns by store and product line.
    This is also known a "multipass SQL", and is supported by some (but not many) other tools.
    So, to accomplish this with Discoverer, you'll either need to create a view, or table, or materialized view that has already put Sales and Inventory into a single (virtual?) fact table. Alternatively you can write the SQL for how to do this linkage (don't forget to handle missing data), and use the Discoverer admin tool to create a custom folder that uses your SQL.
    Hope this helps!

  • SQL*Loader - How to combine 2 controlfiles to one controlfile

    I have several controllfiles which each import another table from another datafile, because I don't want execute every seperat or create a batch file.... I'm looking for a way to put they all in one single controlfile.
    example:
    1st ctl-file:
    LOAD DATA
    INFILE "t1.dat"
    INTO TABLE t1 REPLACE
    FIELDS TERMINATED BY "     "
    (c1,
    c2 "to_number(:c2,'99999999999999999.99999999999999999','NLS_NUMERIC_CHARACTERS=''.,''')",
    c3 date 'YYYY-MM-DD"T"HH24:MI:SS')
    gQuqT     478.60636734965914     2006-12-05T11:00:49
    ÜgQK     963.0277916962095     2006-12-30T08:03:00
    üZfxN     465.15226622488257     2006-12-30T09:14:12
    2nd ctl-file:
    LOAD DATA
    INFILE "t2.dat"
    INTO TABLE t2 REPLACE
    FIELDS TERMINATED BY "     "
    (c1,
    c2 "to_number(:c2,'99999999999999999.99999999999999999','NLS_NUMERIC_CHARACTERS=''.,''')")
    alvwxs     13.0
    poeh     15.0
    zpgiht     21.0
    At the examples is everytime used a id column, to ident which row should import in which table.
    But at my case i need something like a where condition from which file the data should be imported....how should it look?
    Can someone give me an advice how a controlfile should look which import both tables in one controlfile?
    BR
    roland

    It is not possible to combine the last 3 columns as those columns are seperated by commas and in the SQL Loader control file you must ve specified COMMA as an delimiter. So u better have all the columns in the table plus add one more column which holds the concatenation of the 3 columns.
    Vijay

  • How to Merge Flat file data and DSO Data

    I have one DSO A which has more than 20 objects (5 of them are keys), which include 0comp_code,0gl_account,.  I have a Flat file which has the following fields ,COMPANY CODE, GLACCOUNT and SUPERVISOR ,EXECUTIVE,ANALYST. My requirement is to get a DSO with consolidated data from DSO A and Flat File data. That means for exapme, In my DSO A , I have US01 COMPANY CODE so when I merge the data in DSO C It should diplay the data for the supervisor exe and analyst for DSO A as well
    When I added with 2 DSOs A (ECC ) and B (Flat file)..C is getting the data from B and its appending the data for Flat file at the end...So I want to merge both...DSO A should match  up with DSO B flat file company code and gl account and should display the remaining fields
    I think its clear..Can any one let me know the solution ASAP...
    Note: We are on BI7.0 not 3.5...
    Thanks in advance

    I have the following key fields in DSO A :
    0COMP_CODE,OGL_ACCOUNT, 0CHRT_ACCT,0FISCVARNT,0FISCPER,0AC_DOC_NUMBER,0ITEM_NUM.
    Here are the total fields in Flat File:
    COMPANY CODE,GL ACCOUNT,SUPERVISOR,ANALYST,EXECUTIVE.
    Here am taking 0COMP_CODE  and 0GL_ACCOUNT  as key fileds in DSO B for Flat File...
    For every month there will be 5 to 6000 records for Flat file ...
    Thanks

  • How to combine images from several different shoots into one

    Have LR 3.6 for Win xp.
    I have 4 differernt photo shoots that I want to combine into one big single catalogue.  I want to be able to rank and choose images from all 4 shoots at the same time so I can get the best ones identified.
    Each shoot is already in its separate catalogue but I cant figure out how to get all 4 shoots to show up at once so I can rank the best shots and maybe even make a collection of my best images from the 4 shoots.
    How might I do this??
    Thanks Suzzie

    My primary suggestion is that you watch the many videos by Julianne Kost provided in the Adobe site about organizing in the Library Module in LR 4, or read one of the many good LR books. If you want to venture on your own here's a very shorthand description of one of many ways to do what you want. Choose which Catalog you want to use. Open that Catalog and choose "Import from Another Catalog" under the File Menu in the Library Module. Select the images and import them to your chosen main catalog. Once all are in the same Catalog either Keyword all similar images you wish to compare, or make separate Collections of each one. Use the Compare function in the Library ("c" key) and eliminate the one you don't want. Unless you have one client viewing your images in LR and you don't want them to see that you have other images for other clients, I would suggest you use only a single catalog from here on out.

  • How to combine Jars or Include dependent Jars into One Jar

    Hello,
    I have build a small utility using few libraries now i want to make a bundle or jar of this utility. I don't want to let use includes the jars individuals. I want to make a single jar using all the jars so user needs to include only one jar.
    So i need to include the dependent Jar files into a single jar.
    I got few solutions using Google.
    Like:
    adding a Class-Path: myjar.jar to MANIFESTfile.
    simply update the jar with jar using commnad jar uf main.jar myjar.jar_
    but these are not working. when i use the Class-Path option the Tree of main jar looks like
    main.jar
        <default-package>
             myjar.jar
        META-INF
             MANIFEST.MF
    How can i combine the Jars into a single Jar? Please help.

    It is to tell the JVM where to look for additional classesDoes it mean if i includes dependent jars to main jar and if i specify the path then JVM find that jars to specified pathThat's what 'telling the JVM where to look for additional classes' means, isn't it? I don't know what else it would mean.
    and don't need to include it separately?You only have to specify the Class-path in the manifest, and run the JAR file with java -jar. In fact if you specify a classpath on the command line with java -jar it will be ignored.
    All this is in the documentation.

  • How do I convert/merge multiple files (word and PDF) into one PDF?

    I have multiple word docs and PDF files that I need to merge into one file.  How do I do that?

    You should be able to do it in the image processor.
    File > Scripts > Image Processor
    If it doesn't have the options you want, then make an action using "Save for Web", then run the action on a batch of files using
    File > automate > batch
    Select your action from the dropdown menu.

  • SQL LOADER - How to combine 3 rows into 1

    Hi,
    I have an input file composed of 4 different data types in 4 rows.
    line1 has fld1 text(100)
    line2 has fld2 number(4)
    line3 has fld3 date(10) "mm/dd/yyyy"
    line4 has fld4 date(10) "mm/dd/yyyy"
    all line has data in it.
    This is my control file:
    LOAD DATA
    INFILE "fileA.txt"
    truncate
    CONCATENATE 4
    INTO TABLE ps_vz_ppc_blng_aud
    TRAILING NULLCOLS
    ( text_fld CHAR(100) TERMINATED BY WHITESPACE
    ,num_fld INTEGER EXTERNAL(4)
    TERMINATED BY WHITESPACE
    ,begin_date DATE(10) "mm/dd/yyyy"
    TERMINATED BY WHITESPACE
    ,end_date DATE(10) "mm/dd/yyyy"
    TERMINATED BY WHITESPACE
    ,row_added_dttm     sysdate
    ,row_added_oprid "USER"
    My error: cannot insert null into num_fld.
    What did I do wrong? Terminated by whitespace did not end when the line end? Or the first field needs to be 100 characters and ends with end of line?

    That means the structure of your data is now something like:
    line1|1|01/01/2001|02/01/2001
    line2|2|01/01/2002|02/01/2002If so, you can use the following control file
    LOAD DATA
    INFILE "fileA.txt"
    truncate
    INTO TABLE ps_vz_ppc_blng_aud
    FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY '"'
    ( text_fld        char
    , num_fld         integer external
    , begin_date      DATE "mm/dd/yyyy"
    , end_date        DATE "mm/dd/yyyy"
    , row_added_dttm  sysdate
    , row_added_oprid EXPRESSION "USER"
    )P.S. There is no automatic notification, just come back from time to time and check for new postings.

  • How to store all the columns values into one single column

    Hi All,
    this is my file layout,i am receiving the data in below format only
    emp_no,c1,c2,c3,c4,c5
    100 ,1 ,0 ,1 ,0,1
    200 ,1 ,0 ,1 ,0,1
    300 ,1 ,0 ,1 ,0,1
    but i want to store that above data into my table like(from c1 to c5 columns values i want to store in period column)
    emp_no,period
    100 ,1
    100 ,0
    100 ,1
    100 ,0
    100 ,1
    200 ,1
    200 ,0
    200 ,1
    200 ,0
    200 ,1
    300 ,1
    300 ,0
    300 ,1
    300 ,0
    300 ,1
    please help me

    Strange but this is it
    Processing ...
    with original as (
         select 100 as id ,1 as v1,0 as v2,1 as v3,0 as v4,1 as v5
         from dual
         union all
         select 200 ,1 ,0 ,1 ,0,1
         from dual
         union all
         select 300 ,1 ,0 ,1 ,0,1
         from dual
    select id,v1 as res_row
    from original
    union all
    select id,v2
    from original
    union all
         select id,v3
         from original
    union all
         select id,v4
         from original
    union all
         select id,v5
         from original
                      ID                                   RES_ROW
                                       100                                      1
                                       200                                      1
                                       300                                      1
                                       100                                      0
                                       200                                      0
                                       300                                      0
                                       100                                      1
                                       200                                      1
                                       300                                      1
                                       100                                      0
                                       200                                      0
                                       300                                      0
                                       100                                      1
                                       200                                      1
                                       300                                      1
    15 row(s) retrievedBye Alessandro

  • How to save my file, that I put into multitrack session, with changes what I did in there

    Alright. I have a mission to make Audio CD from some tracks that are not consistent with each other. So I put my files into "track one" and I put on every ending of previous file an opening of subsequent file. It turned out something like fade-in/fade-out. So, is there any way to save my files in this possition separatly? I was doing this: save it all in a single mix and cut each song by itself. It's not very convenient, plus I'd like an even split. I hope you get the idea: to make MP3 files, which "flow" into each other. We need a more automatic way.
    Thanks.

    _durin_ wrote:
    After completing your mix in multitrack, you can create range markers by making a time-selection for each song positioning the end of your range in the middle of your cross-fade and pressing "M", then starting the next range selection at that position.
    When you have a range marker to represent each of your desired files, perform a mixdown.  The markers will be retained in the complete mixdown.  Open the Markers panel, select all the markers, then select File > Export > Audio within Range Markers...  You'll be able to export as MP3 files and each file will represent each marker range.
    If you're using Audition CS6, you can simply convert these Range Markers from CUE to CD TRACK and insert them into a CD Layout.  Be sure to set the track pause to 0 seconds so you get the smooth transition from one track to the next with no gap.
    Great, it works, but imperfect. There are clicks at the junction of tracks, they do not cross-over smoothly into each other. Requires perfect precision cut--noiseless, no click.

  • How to locate all iTunes libraries and condense into one?

    Last fall I did multiple backups of my iTunes library, along with random music folders.  I reloaded my OS X and it seems didn't restore my iTunes folder correctly. 
    What is going to be the most efficient way for me to:
    1: Locate all my libraries (two backups with one being Time Machine)
    2: Place them all together in a Master iTunes library?
    I'm frustrated wondering if I've lost a big file of music!
    I see there's been other queries similar to my problem but the ones I read were dating back a number of years ago...
    Thanks for any help.

    06/2014 ChrisCA post: Restore iTunes library from Time Machine backup - https://discussions.apple.com/message/26104480#26104480 Useful tips where restoring to a new drive: http://pondini.org/TM/B6.html and https://discussions.apple.com/message/27599985#27599985
    No, a library is a bunch of files working together:
    What are the iTunes library files? - http://support.apple.com/kb/HT1660
    More on iTunes library files and what they do - http://en.wikipedia.org/wiki/ITunes#Media_management
    What are all those iTunes files? - http://www.macworld.com/article/139974/2009/04/itunes_files.html
    Where are my iTunes files located? - http://support.apple.com/kb/ht1391
    iTunes 9 [and later]: Understanding iTunes Media Organization - http://support.apple.com/kb/ht3847 - plus supplemental information about organizing to new structure https://discussions.apple.com/message/26404702#26404702
    Image of folder structure and explanation of different iTunes versions (turingtest2 post) - https://discussions.apple.com/docs/DOC-7392 and making an iTunes library portable.
    In your case unless you want things to get very messy very quickly the best thing is to choose which library you want as your starting copy, then add any media files you think are not in that library from the media folder used by the other backup.  If you want hugely messy you add all media files just to be safe and then spend a week or two sorting out the duplicates one by one.  If you want immensely, hugely messy you do the former and import the other library file into the first one and sort out all the duplicate playlists created in doing so as well as all the duplicate media files.  I mean for me I know yesterday's backup is last week's backup plus new media plus changes I have made, so I don't really need last week's backup unless yesterday's backup drive has fried.  I only really need one or the other.

  • Combining two single recordset into one two column recordset

    Hi Forum
    Assume we have three types , each 'table of'
    CREATE OR REPLACE type type1 as table of number ;
    CREATE OR REPLACE type type2 as table of varchar2 (255);
    CREATE OR REPLACE TYPE TYPEVALUE AS OBJECT
    (object_type number ,
    object_value varchar2(255)
    resultset1 type1 := type1() ;
    resultset2 type2 := type2() ;
    resultset3 typevalue := typeValue3() ;
    I want to populate records of resultset3 from resultset1 and resultset2 , using resultset1 for first column of record and resultset2 for second column.
    One way is to do for loop but I don't want to use this.
    I need something similar to resultset3 to use it dynamically in select statement to do MINUS operation with another resultset . I think things like MULTISET, COLLECT, CAST can achieve what I want to do.
    Can you please help me to have a select statement that combines two single column rowset and put into a two column recordset.
    Thanks

    Hi,
    You can do something like this:
    SQL> create or replace type type1 as table of number;
      2  /
    Type created.
    SQL> create or replace type type2 as table of varchar2(255);
      2  /
    Type created.
    SQL> create or replace type typevalue as object(object_type number, object_value varchar2(255));
      2  /
    Type created.
    SQL> create type typevalue_tab as table of typevalue;
      2  /
    Type created.
    SQL> ed
      1  declare
      2     resultset1 type1 := type1(1, 2, 3, 4, 5);
      3     resultset2 type2 := type2('one', 'two', 'three', 'four', 'five');
      4     resultset3 typevalue_tab;
      5  begin
      6     for l_res in (
      7        select typevalue(t1.col1, t2.col2) as col
      8        from (
      9           select column_value col1
    10           , rownum rn
    11           from table(cast(resultset1 as type1))
    12        ) t1
    13        , (
    14           select column_value col2
    15           , rownum rn
    16           from table(cast(resultset2 as type2))
    17        ) t2
    18        where t1.rn = t2.rn
    19     )
    20     loop
    21        dbms_output.put_line(
    22           'Object Type:  '||l_res.col.object_type||' '||
    23           'Object Value: '||l_res.col.object_value
    24        );
    25     end loop;
    26* end;
    SQL> /
    Object Type:  1 Object Value: one
    Object Type:  2 Object Value: two
    Object Type:  3 Object Value: three
    Object Type:  4 Object Value: four
    Object Type:  5 Object Value: five
    PL/SQL procedure successfully completed.All the work here is done in SQL so it should work similarly if you have these things defined as nested table columns in the database.
    However, there is a caveat here: the lines highlighted in bold above are defining an arbitrary ordering for the nested table elements using rownum, as there is no concept of ordering within a nested table. You should change this part of the query to whatever makes sense in your environment, otherwise this solution cannot be guaranteed to be correct. Another option would be to use VARRAYs, as they will retain the order of elements.
    cheers,
    Anthony

  • How to load data from a  flat file which is there in the application server

    HI All,
              how to load data from a  flat file which is there in the application server..

    Hi,
    Firstly you will need to place the file(s) in the AL11 path. Then in your infopackage in "Extraction" tab you need to select "Application Server" option. Then you need to specify the path as well as the exact file you want to load by using the browsing button.
    If your file name keeps changing on a daily basis i.e. name_ddmmyyyy.csv, then in the Extraction tab you have the option to write an ABAP routine that generates the file name. Here you will need to append sy-datum to "name" and then append ".csv" to generate complete filename.
    Please let me know if this is helpful or if you need any more inputs.
    Thanks & Regards,
    Nishant Tatkar.

Maybe you are looking for