Exporting table data to a Comma Separated file / .dat file?

Hi All,
I want to export the table data to a .CSV or .DAT file. This data is an input to other software to read and load like "Informatica".
I tried spooling the file by providing the extension as .CSV but that did'nt work!
Could you please let me know how can I get the data of a table into a .CSV or .DAT file?
I am trying to get it via SQL Prompt.
Thanks in advance.
Himanshu

Take a look to the Laurent Schneider's solution.
Nicolas.

Similar Messages

  • Exporting Metadata (caption information) from JPEGS to a comma separated value (CSV) file

    Here is my dilemma. I am an archivist at an arts organization and we are in the process of digitizing many of our materials to post them on the web and make them available to internet users. One of the principle components of our collection is a large trove of photographs. We have been in the process of digitizing these images and embedding metadata (in the Caption/Description, Author/Photographer and Copyright fields) via PhotoShops File Info command.
    Now I am at a crossroads. We need to extract this metadata and transfer it into a comma separated value form, like an Excel spreadsheet or a FileMakerPro database. I have been told that it is not possible to do this through PhotoShop, that I must run a script through Acrobat or Bridge. I have no clue how to do this. I have been directed to a couple of links.
    First I was directed to this (now dead) link: http://www.barredrocksoftware.com/products.html
    The BSExportMetadata script allegedly exports the metadata from files selected in Adobe's Bridge into a comma separated value (CSV) file suitable for import into Excel, Access and most database programs. It installs as a Bridge menu item making it simple to use. The the Export Metadata script provides you with an easy to use wizard allowing you to select associated information about a set of images that you can then export. This script requires Creative Suite 2 (CS2). This script sounds like it does exactly what I want to do, but unfortunately, it no longer exists.
    Then I found this:
    Arnold Dubin, "Script to Export and Import Keywords and Metadata" #13, 8 Aug 2005 7:23 am
    I tried this procedure, but nothing seemed to happen. I also tried to copy the script into the JAVASCRIPT action option in Acrobat, but I received a message that the script had an error. It also seems to me that this script does not set up a dumping point, that is, a file into which this information will be exported to.
    I am a novice, not a code writer or a programmer/developer. I need a step-by-step explanation of how to implement this filtering of information. We have about 2000 jpeg and tiff files, so I would rather not go through each file and copy and paste this information elsewhere. I need to find out how to create a batch process that will do this procedure for me. Can anyone help?

    Hello -
    Is anyone aware of a tool that will do the above that is available for mac? Everything I've found so far seems to be PC only.
    Any help is appreciated, thanks!

  • HT2486 The selected file does not appear to be a valid comma separated values (csv) file or a valid tab delimited file. Choose a different file.

    The selected file does not appear to be a valid comma separated values (csv) file or a valid tab delimited file. Choose a different file.

    I guess your question is, "what's wrong with the file?"
    You're going to have to figure that out yourself, as we cannot see the file.
    Importing into Address book requires either a tab-delimited or a comma-delimited file. You can export out of most spreadsheets into a csv file. However, you need to make sure you clean up the file first.  If you have a field that has commas in the field, they will create new fields at the comma. So, some lines will have more fields than the others, causing issues like the error you saw.

  • Converting xml data in to comma separated values in bpel

    Is there a way to covert generic xml data to comma separated value in BPEL? i have tried using createDelimitedString but no luck.
    Please guide me on this issue.
    Thanks!
    Shan
    Edited by: 876372 on Aug 3, 2011 6:58 AM

    Hi,
    Have a luk at the below link it has many examples:
    http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm

  • [b]Report, comma separated column data[/b]

    Hi all
    I M using Oracle 7.3 as backend and report 6i as frontend.
    I have a table T1 with columns
    custno - varchar2(4)
    billno - number(3)
    The data it contains as
    custno billno
    a123 100
    a123 200
    b234 111
    b234 222
    a123 300
    b234 333
    z678 765
    I want the output in report as follows
    custno billno
    a123 100,200,300
    b234 111,222,333
    z678 765
    I should mention here that the custno and bill no will keep on growing.
    Can anybody help
    UMESH

    Make a Group Left report using the Report wizard with the group field as CustNo and displayed fields as CustNo and Bill No.
    Now,
    For the Outermost repeating frame i.e. R_G_CustNo for the group G_CustNo,
    Select:
    Print Direction :Down
    Vertical Elasticity : Variable
    Horizontal Elasticity: Fixed
    With the other settings as default
    Now this repeating frame contains F_CustNo, R_G_BillNo, F_BillNo
    For the repeating frame i.e. R_G_ BillNo for the group G_ BillNo,
    Select:
    Print Direction : Across/Down
    Vertical Elasticity : Variable
    Horizontal Elasticity: Fixed
    With the other settings as default
    Please note that in the Paper Layout R_G_CustNo should be stretched horizontally over the whole panel whereas R_G_ BillNo should be just the minimum size required so that it can be repeated over R_G_CustNo horizontally
    Swati

  • InDesign CS6 ePub Export : Tables with header and footer in HTML

    Hey there,
    does anyone know, whether InDesign CS6 also exports Table Headers and footers correctly into the XHTML-File of the ePub.
    What I mean, is whether the elements <thead> and <tfoot> are created?
    Or is it only possible to steer this via the CSS-Classnames which can be given in the tableformats?
    Generally I think it would be better if the user had the chance to map other exporttags to its elements than just p, em, strong, h1-h6.
    it would be useful to also put in other elements by hand.
    Best regrads.

    Magnolee2 wrote:
    does anyone know, whether InDesign CS6 also exports Table Headers and footers correctly into the XHTML-File of the ePub.
    What I mean, is whether the elements <thead> and <tfoot> are created?
    By "also", do you mean the behavior is changed with respect to CS5/CS5.5? In those, thead and tfoot are created correctly. (Although, quite disconcerting, in the order "thead / tfoot / tbody". ePub renderers based on Webkit display them correctly nevertheless, but others do not. An extremely annoying free interpretation of the W3C rules.)

  • Using Comma-Separated Selector

    I am building a site with products that can have different colors.
    Some products share colors.
    I am using the Comma-Separated Selector to select the available colors for each product from a list.
    My problem is showing each product and the colors available for each product.
    How do I create a recordset that pulls only the colors I need from the colors table based on the comma separated feild from the products table?
    Thanks for any help or point in the right direction.
    RGNelson

    Difficult to say without seeing how your database is planned
    Nested region? - probably not
    take a look at the MYSQL query with uses
    HAVING IN (items in a comma separated list, item, item, etc)
    this is the same approach as the article you mentioned
    also a similar problem (possibly) mentioned here...
    ryanpratt, "Multiple conditions in Querey builder Help" #2, 18 Nov 2008 7:30 am
    atb
    Paul

  • Flat files data comma separated using SSIS.

    Hi,
    I have multiple flat files which come in comma separated columns. See example below :
    Customer Data
    CustID,FName,LName,Disease,Email,Phone
    12345,Xyz,Smit,Bronchitis, Asthma and fever,[email protected],80000000
    12346,Abc,Doe,fever Headache,[email protected],90000000
    12347,Klu,joe,Sugar, cough and fever,[email protected],12345678
    Please look at the ID's 12345 and 12347. The disease column has a internal comma space between. How do i remove the comma spaces in the disease column, so that it can be loaded from flat file to sql table using SSIS. ?
    Please help !
    Thanks

    Here is a full solution base on my post above (first option)
    1. create temp table (Give it a unique name):
    create table #T (Txt NVARCHAR(MAX))
    GO
    2. Insert all the data into temporary table. Each line in the text file, is a value for one column in a row in the table.
    -- I will jump to the table and use simple insert.
    -- If you have problem with step 1 then please inform us (this is simple bulk insert basically)
    insert #T (Txt) values
    ('1234435,Xyz,Stemit,Brfsdonchitis, Asthma and fever,[email protected],80000000'),
    ('12346,Agjdfjbc,Doge,fevhhhher Headsxdshhache,[email protected],90000000'),
    ('123447,Klu,joe,Sugar, cough and fever,[email protected],12345678')
    GO
    the result should be like this:
    Txt
    1234435,Xyz,Stemit,Brfsdonchitis, Asthma and fever,[email protected],80000000
    12346,Agjdfjbc,Doge,fevhhhher Headsxdshhache,[email protected],90000000
    123447,Klu,joe,Sugar, cough and fever,[email protected],12345678
    I use a SPLIT Function named Split_CLR_Fn. This is a CLR Split function that get input <string to split> and <string as delimiter,> and it return table with 2 columns ID, SplitData
    For example if you use: SELECT * from Split_CLR_Fn('text1,text2,text3,',') then you get result:
    ID SplitData
    1 Text1
    2 Text2
    3 Text3
    ** You can find in the internet several good functions, I HIGHLY RECOMMENDED NOT TO USE T-SQL FUNCTIONS but CLR FUNCTION. Check thi link to understand why:
    http://sqlperformance.com/2012/07/t-sql-queries/split-strings
    ** This is the best function that I know about and I use it, but I change the code a bit to return 2 columns and not just the SplitData as in this blog: http://sqlblog.com/blogs/adam_machanic/archive/2009/04/28/sqlclr-string-splitting-part-2-even-faster-even-more-scalable.aspx
    That's it :-) we are ready for the solution which is very simple
    Solution 1 (BAD solution but easy to write):
    select
    (select SplitData from Split_CLR_Fn(Txt,',') where ID = 1) CustID,
    (select SplitData from Split_CLR_Fn(Txt,',') where ID = 2) FName,
    (select SplitData from Split_CLR_Fn(Txt,',') where ID = 3) LName,
    STUFF((select ',' + SplitData from Split_CLR_Fn(Txt,',') where ID > 3 and ID < (select MAX(ID) from Split_CLR_Fn(Txt,',')) - 1 for XML path('')), 1 , 1,'') Disease,
    (select SplitData from Split_CLR_Fn(Txt,',') where ID = (select MAX(ID) from Split_CLR_Fn(Txt,',')) - 1) Email,
    (select SplitData from Split_CLR_Fn(Txt,',') where ID = (select MAX(ID) from Split_CLR_Fn(Txt,','))) Phone
    from #T
    GO
    Solution 2: better in this case since the format is constant (this is the solution I wrote about above)
    ;With MyCTE as (
    select
    Txt,
    SUBSTRING(Txt, 1, CHARINDEX(',', Txt, 1) - 1) as CustID
    , SUBSTRING(
    Txt
    ,CHARINDEX(',', Txt, 1) + 1 -- I start from the end of preview len
    , CHARINDEX(',', Txt, CHARINDEX(',', Txt, 1)+1)- CHARINDEX(',', Txt, 1) - 1
    ) as FName
    , SUBSTRING(
    Txt
    ,CHARINDEX(',', Txt, CHARINDEX(',', Txt, 1)+1)+1 -- I start from the end of preview len
    , CHARINDEX(',', Txt, CHARINDEX(',', Txt, CHARINDEX(',', Txt, 1)+1)+1) - CHARINDEX(',', Txt, CHARINDEX(',', Txt, 1)+1) - 1
    ) as LName
    , RIGHT(Txt, CHARINDEX(',', REVERSE(Txt), 1) - 1) as Phone
    , RIGHT(LEFT(Txt, Len(Txt) - Len(RIGHT(Txt, CHARINDEX(',', REVERSE(Txt), 1) - 1)) - 1), CHARINDEX(',', REVERSE(LEFT(Txt, Len(Txt) - Len(RIGHT(Txt, CHARINDEX(',', REVERSE(Txt), 1) - 1)) - 1)), 1) - 1) as Email
    from #T
    select CustID,FName,LName, Phone, Email, SUBSTRING(Txt, Len(CustID) + Len(FName) + Len(LName) + 4, Len(Txt) - Len(Email) - LEN(Phone) - Len(CustID) - Len(FName) - Len(LName) - 5) as Disease
    from MyCTE
    I hope that this is useful :-)
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • How can we export table data to a CSV file??

    Hi,
    I have the following requirement. Initially business agreed upon, exporting the table data to Excel file. But now, they would like to export the table data to a CSV file, which is not being supported by af:exportCollectionActionListener component.
    Because, when i opened the exported CSV file, i can see the exported data sorrounded with HTML tags. Hence the issue.
    Does someone has any solution for this ... Like, how can we export the table data to csv format. And it should work similar to exporting the data to excel sheet.
    For youre reference here is the code which i have used to export the table data..
    ><f:facet name="menus">
    ><af:menu text="Menu" id="m1">
    ><af:commandMenuItem text="Print" id="cmi1">
    ><af:exportCollectionActionListener exportedId="t1"
    >title="CommunicationDistributionList"
    >filename="CommunicationDistributionList"
    >type="excelHTML"/> ---- I tried with removing value for this attribute. With no value, it did not worked at all.
    ></af:commandMenuItem>
    ></af:menu>
    ></f:facet>
    Thanks & Regards,
    Kiran Konjeti

    Hi Alex,
    I have already visited that POST and it works only in 10g. Not in 11g.
    I got the solution for this. The solution is :
    Use the following code in jsff
    ==================
    <af:commandButton text="Export Data" id="ctb1">><af:fileDownloadActionListener contentType="text/csv; charset=utf-8"
    >filename="test.csv"
    >method="#{pageFlowScope.pageFlowScopeDemoAppMB.test}"/>
    ></af:commandButton>
    OR
    <af:commandButton text="Export Data" id="ctb1">><af:fileDownloadActionListener contentType="application/vnd.ms-excel; charset=utf-8"
    >filename="test.csv"
    >method="#{pageFlowScope.pageFlowScopeDemoAppMB.test}"/>
    ></af:commandButton>
    And place this code in ManagedBean
    ======================
    > public void test(FacesContext facesContext, OutputStream outputStream) throws IOException {
    > DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    >DCIteratorBinding itrBinding = (DCIteratorBinding)dcBindings.get("fetchDataIterator");
    >tableRows = itrBinding.getAllRowsInRange();
    preparaing column headers
    >PrintWriter out = new PrintWriter(outputStream);
    >out.print(" ID");
    >out.print(",");
    >out.print("Name");
    >out.print(",");
    >out.print("Designation");
    >out.print(",");
    >out.print("Salary");
    >out.println();
    preparing column data
    > for(Row row : tableRows){
    >DCDataRow dataRow = (DCDataRow)row;
    > DataLoaderDTO dto = (DataLoaderDTO)dataRow.getDataProvider();
    >out.print(dto.getId());
    >out.print(",");
    >out.print(dto.getName());
    >out.print(",");
    >out.print(dto.getDesgntn());
    >out.print(",");
    >out.print(dto.getSalary());
    >out.println();
    >}
    >out.flush();
    >out.close();
    > }
    And do the following settings(*OPTIONAL*) for your browser - Only in case, if the file is being blocked by IE
    ==================================================================
    http://ais-ss.usc.edu/helpdoc/main/browser/bris004b.html
    This resolves implementation of exporting table data to CSV file in 11g.
    Thanks & Regards,
    Kiran Konjeti

  • Combine data from a table and insert to another in comma separated format

    In my SQL database table i have some data as shown below.
    KNO       Course      Grade     Institution
    124        BTECH       First       IIT Calicut
    128        BE             First       KKS Institute
    124        CCNA         Q          NIIT Delhi
    124        DDCN         Q          Appl Calicut
    128        DIT            A         NIIT Delhi
    128        VB              Q        IICM Delhi
    i want this courses to be arranged as sample given under to a table named mainpers
    KNO    Course    
    124     BTECH[First], CCNA[Q],DDCN[Q]
    128     BE[First], DIT[A], VB[Q] 
    I am a System Administrator at Vadodara

    You can do this in SQL.
    with cte as (
    select distinct KNO
    from Table1
    select KNO
    , Stuff(
    (select ',' + Course + '[' + Grade + ']'
    from Table1
    where Table1.KNO = cte.KNO
    for xml path ('')
    ), 1, 1, '') as Course
    from cte
    http://davidduffett.net/post/5334646215/get-a-comma-separated-list-of-values-in-sql-with-for
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

  • Export table data in a flat file without using FL

    Hi,
    I am looking for options where I can export table data into a flat file without using FL(File Layout) i.e., by using App Engine only.
    Please share your experience if you did anything as this
    Thanks

    A simple way to export any record (table/view) to an csv fiel, is to create a rowset and loop through all record fields, like below example code
    Local Rowset &RS;
    Local Record &Rec;
    Local File &MYFILE;
    Local string &FileName, &strRecName, &Line, &Seperator, &Value;
    Local number &numRow, &numField;
    &FileName = "c:\temp\test.csv";
    &strRecName = "PSOPRDEFN";
    &Seperator = ";";
    &RS = CreateRowset(@("Record." | &strRecName));
    &RS.Fill();
    &MYFILE = GetFile(&FileName, "W", %FilePath_Absolute);
    If &MYFILE.IsOpen Then
       For &numRow = 1 To &RS.ActiveRowCount
          &Rec = &RS(&numRow).GetRecord(@("RECORD." | &strRecName));
          For &numField = 1 To &Rec.FieldCount
             &Value = String(&Rec.GetField(&numField).Value);
             If &numField = 1 Then
                &Line = &Value;
             Else
                &Line = &Line | &Seperator | &Value;
             End-If;
          End-For;
          &MYFILE.WriteLine(&Line);
       End-For;
    End-If;
    &MYFILE.Close(); You can of course create an application class for generic calling this piece of code.
    Hope it helps.
    Note:
    Do not come complaining to me on performance issues ;)

  • Store table data in a tab separated file in oracle apex

    How to store table data in a tab separated file in oracle apex ?
    Suppose i have a table 'Table1' as shown below.
    id name
    1 x
    2 y
    I want to get the result 'select * from table1;' into a tab separated file in oracle apex.

    For client you could
    - invoke call to Oracle Reports, where an .rdf is ready to generate one for you
    - utilise download as csv option in interactive reports
    - call page that generates csv using htp package (CSV Download without Header, possible?
    - modify an interactive report to do a similar thing (http://www.talkapex.com/2009/04/custom-download-for-apex-interactive.html)

  • Exporting table data to a CSV file

    hello everyone,
    i need help on exporting table data to a CSV file.
    I have a div element containing the table which displays some data.
    there is a "Export" button just above the table, which if clicked, will export the current data in the table to a .csv file.
    can this be done in jsp? or i need to use servlet?
    also how can i submit the table data only? (as my webpage contiain other data also)
    can anyone provide with some sort of sample code?
    thanks in advance!!

    oops!!
    i just forgot..
    when the user will click on the export button, i want to greet him with a "Save As"
    popup, so that he can specify the filename and location to save the file.
    thanks!!

  • When I import a text file(comma separated )into a numbers spread sheet all the data goes into one column. Why does the text not go into separate columns based on the commas.

    When I import a text file(comma separated) into a numbers spreadsheet all the data goes into one column instead of individual columns based on the comma separators.  Excel allows you to do this during the import..  Is there a way to accomplish this in numbers without opening it in Excel and the importing into Numbers.

    Your user info says iPad. This is the OS X Numbers forum. Assuming you are using OS X… Be sure the file is named with a .csv suffix.
    (I don't have an iPad, so I don't know the iOS answer.)

  • Exporting table data to .csv file

    How to export the table data (this table is having 18 million records) to .csv file. using SQL Developer and PL/SQL deveoloper it is taking too long time to complete. Please let me know is there any faster way to complete this task.
    Thanks in advance

    Also bear in mind that SQL Developer and PL/SQL Developer are running on your local client, so it's transferring all 18 million rows to the client before formatting and putting them out to a file. If you had some PL/SQL code to export it on the database server it would run a lot faster as you wouldn't have the network traffic delay to deal with, although your file would then reside on the server rather than the client (which isn't necessarily a bad thing as a lot of companies would be concerned about the security of their data especially if it ends up being stored on local machines rather than on a secure server).
    As already asked, why on earth do you need to store 18 million rows in a CSV file? The database is the best place to keep the data.

Maybe you are looking for

  • Need help with refreshing open window in new tab

    Hello all, First, all my other problems I've solved.  One last thing, being a newbie and trying things I've found on the net and them not working, I can use your help one last time.  My code has a Home page that peforms a Search (most of you have I a

  • Issue with MSSQL server connectivity from ODI 10.1.3

    Hi, In one of the interface we are populating data to target table in MSSQL server version 2005. The physical topology connection results successful. Since so long there is no problem and it is running successful. But suddenly I'm facing issues with

  • Automatically add InDesign metadata to Exported PDF

    Dear InDesigners,  For the studio I work it became important to make visible which person (Author) worked on a certain document as well as what the latest version of that specific document is.  It sometimes happens that clients send us a PDF file (wi

  • How to Extract R/3 Multiple Valued variant Classification Data in BI

    Dear Gurus,                     got stuck in a situation where I am in need of your help. My Client want to extract the R3 Classification Data(Variant, Batch) into BI. I will share till what point I had reached. Used Transaction Code CTBW, was Trying

  • Best way to heal a spike, audition cs6

    I've got a spike (electromagnetic noise spike from the wireless microphone on the talent, sounds like it's a cell phone hit maybe) in an audition file I can't seem to get fix. All I want to do is minimize it. This is a class room presentation, so per