Issue when creating a CSV file

Stupid issue but I've tried to fix it all day and it's not working...
I need to create a CSV file made up of 3 columns, 2 number and 1 char. The char column is a company name that has spaces in it. When I run the query in SQL Developer, the char column looks fine. When I run in in BiPub as a CSV, I get double-quotes around the char column. It looks fine if I would look at it as DATA or any other format.
I can't use the REPLACE function because there's nothing wrong with the data.
We're using BI Pub v.10.1.3.4.
Any thoughts?
Thanks!!
Kris

First I tried using a basic rtf file and just selected CSV as the type. Then I tried using the 'e-text template' and selecting CSV, same result. Now I'm trying to use an .xsl file instead of a .rtf to see if that works.
Kris

Similar Messages

  • Issue when I upload CSV file for insert contact list on Cisco Attendant Console Advanced

    Hi Friends,
    I have error "Provided file is not valid CSV File" when I upload CSV file to Cisco Attendant Console Advanced system. I'm not sure what happen about my CSV. My purpose is insert contact list to system and create CSV base on documentation.
    Anyone have idea to solve this issue please kindly help me.
    Thanks

    You are right, whenever Cisco device boots, the IOS files gets loaded on the DRAM.
    But in this process, some temporary files are also generated which gets saved in the flash/Disk, that’s the only reason you got these error messages. It’s not recommended at all to have less space in the Flash than what is recommended on Cisco.com. I would say please remove some files from Disk and have minimum 256 MB flash otherwise your router may drop into rommon mode at the time of next reload.
    Well, it’s good to upgrade the bootstarp image too. Currently you are running 15.X IOS code, I would say run 15.X bootstarp image on the box.
    You may download bootstarp image for 7206VRX NPEG2 from the link below:-
    http://software.cisco.com/download/release.html?mdfid=282188585&flowid=1380&softwareid=280805685&release=15.2.4S4&relind=AVAILABLE&rellifecycle=ED&reltype=latest
    If you want to know the procedure of the upgrade, click the link mentioned below:-
    http://www.cisco.com/en/US/docs/ios/12_2/configfun/command/reference/frf010.html#wp1017654
    -Amant

  • Generally when creating a Word file from either a Mac or Win7 pc and opening it on two different machines (either one first) it always prompts that the file is open and will be opened as read only. However opening a CSS file does not prompt that it is alr

    Generally when creating a Word file from either a Mac or Win7 pc and opening it on two different machines (either one first) it always prompts that the file is open and will be opened as read only.
    However opening a CSS file does not prompt that it is already open on or from any machine which is causing code edits to be lost.
    What we found from out testing:
    - The file can be saved from one user to the server and WILL NOT PROMPT on other machines until the saving machine has the Dreamweaver program closed completely
    - The file can be closed and  Dreamweaver minimised to the launch bar but it still will not register on other machines that it has been changed.
    - Also, until the  Dreamweaver program is closed on the machines, it will continue to open it's saved version of the file. 
    Example Scenario:
    - User 1 opens test.css (which is 2000 lines) and adds some code to the end of the file to bring it up to 2500 lines
    - Meanwhile User 2 opens test.css as well (opens as 2000 lines as User 1’s edits have not yet been saved) and adds in code to bring it to 2300 lines
    - User 1 saves his file and closes it - but  Dreamweaver is still open.
    - User 2 also saves his file and leaves  Dreamweaver  open.
    - The server will report the size and last edit of the file the same as User 2 as he was the last person to save it (and if you open from the Win7 Machine it will show as User 2’s 2300 line version)
    - If User 1 then open's the file again (from either the 'recent' in Dreamweaver OR clicking on the file directly in Finder...which version opens.... The version that User 1 saved! Not the true version on the server, but the version that User 1 edited and saved with 2500 lines in it.
    - Same for User 2, he will open 'his' version with 2300 lines in.
    Other information:
    - Files are opened directly from the server
    - Sometimes the users will save incrementally and re-open
    - Most of the time users will save incrementally and keep the files open
    - The users will never not save incrementally and just save when closing the file once finished
    - The users are usually working on the files all day
    - It is always the bottom lines of code that are lost. It could be a case of the two versions being mixed up and cutting off the newly added lines based on the line count (possibly).
    It is as if Dreamweaver is holding a cache of the version locally and then only properly looking back to the server when it has been completely closed. It is very difficult to see how the server is causing such an impact on these files, there are very few logs which are giving any indication to the root cause of the problems.
    Anyone know if this is a known issue?
    Is there a way that there can be a featured implemented on the server that doesn't allow another user to open a file if it is already open on another machine?
    Thanks

    Your server file handling has nothing, and really nothing to do with Adobe software. If files don't get locked for (over-)writing and/or lose connection to the program opening them, then your server is misconfigured. It's as plain and simple and that. Anything from "known file types"/ file associations not being set correctly, MIME types being botched, crooked user privileges and file permissions, missing Mac server extensions, delayed file writing on the server, generic network timeout issues and what have you. Either way, you have written a longwinded post with no real value since you haven't bothered to provide any proper technical info, most notably about the alleged server. Either way, the only way you can "fix" it is by straightening out your server and network configuration, not some magic switch in Adobe's software.
    Mylenium

  • How to create a .CSV file & place it  in Application server

    Hi All,
    I have a requirement like .
    1.Create a .CSV file by using report output data.
    2.The .csv file should be placed in application server.
    When user will execute the report,
    automatically a .csv has to generate and that should be available at application server.
    points will be rewarded.
    Thanks,
    Anil

    Hi,
      Whatever the final output internal table is there  loop that
    DATA : begin of i_final occurs 0,
                  field1(20),
                  field2(20),
                end of i_final.
    DATA : v_filepath (200) TYPE c Value '/data/sapdata/test.csv' .
    DATA : begin of i_file_data occurs 0,
                  Rec(500),
                end of i_file_data.
    LOOP AT i_final.
    CONCATENATE i_final-field1  i_final-field2  INTO i_file_data-rec SEPARATED BY ','.
    APPEND i_file_data.
    CLEAR  i_file_data.
    ENDLOOP.
    OPEN DATASET v_filepath IN OUTPUT  FOR TEXT MODE.
    LOOP AT i_file_data.
      TRANSFER  i_file_data-rec TO  v_filepath.
    ENDLOOP.
    CLOSE v_filepath.
    To check the file goto Tcode->AL11>data/sapdata/test.csv.

  • Getting CLOB fron Database then creating a CSV File

    Hi,
    I am trying to read a CLOB for the DB in my Backing Bean with the help of EJB.
    The code in my backing bean is:
    char[] strReportContent = reportObj.getReportText();The API where the accessors for getReportText() is;
      @Lob
      @Column(name="REPORT_TEXT")
      public char[] getReportText()
        return reportText;
      public void setReportText(char[] reportText)
        this.reportText = reportText;
      }The problem is that when I do a system out on strReportContent I get a garbage value and not what is in the DB.
    Please Help.
    Then to render it on the CSV the code is:
      // Init servlet response.
          response.reset();
          response.setContentType("plain/text");
          // response.setContentLength(input.available());
          response.setHeader("Content-disposition",
                             "inline; filename=\"" + selectedReportId.getReportName() + "\"");
          output =
              new BufferedOutputStream(response.getOutputStream(), DEFAULT_BUFFER_SIZE);
    char[] strReportContent = reportObj.getReportText();
    output.write(strReportContent.toString().getBytes(), 0, strReportContent.length);

    Hi,
    I am not removing any zeroes . I created the same file in .txt format and XI was able to write the value 008.2010 to the txt file.
    I suppose this has somehting to do with excel file properties . By default when we add 008.2010 in the excel sheet , it takes only 8.201. We need to change the format to "text" manually in the excel file to take in zeroes as well.
    So , i really dont know how to make sure that the excel file properties does not truncate zeroes while XI is creating the CSV file.
    Regards
    Vinay P.

  • Performance issues when creating a Report / Query in Discoverer

    Hi forum,
    Hope you are can help, it involves a performance issues when creating a Report / Query.
    I have a Discoverer Report that currently takes less than 5 seconds to run. After I add a condition to bring back Batch Status that = ‘Posted’ we cancelled the query after reaching 20 minutes as this is way too long. If I remove the condition the query time goes back to less than 5 seconds.
    Please see attached the SQL Inspector Plan:
    Before Condition
    SELECT STATEMENT
    SORT GROUP BY
    VIEW SYS
    SORT GROUP BY
    NESTED LOOPS OUTER
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID GL.GL_CODE_COMBINATIONS
    AND-EQUAL
    INDEX RANGE SCAN GL.GL_CODE_COMBINATIONS_N2
    INDEX RANGE SCAN GL.GL_CODE_COMBINATIONS_N1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES
    INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUES_N1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUE_SETS
    INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUE_SETS_U1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES_TL
    INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUES_TL_U1
    INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUE_NORM_HIER_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_LINES
    INDEX RANGE SCAN GL.GL_JE_LINES_N1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_HEADERS
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_DAILY_CONVERSION_TYPES_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_SOURCES_TL
    INDEX UNIQUE SCAN GL.GL_JE_SOURCES_TL_U1
    INDEX UNIQUE SCAN GL.GL_JE_CATEGORIES_TL_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    INDEX UNIQUE SCAN GL.GL_BUDGET_VERSIONS_U1
    INDEX UNIQUE SCAN GL.GL_ENCUMBRANCE_TYPES_U1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_BATCHES
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_PERIODS
    INDEX RANGE SCAN GL.GL_PERIODS_U1
    After Condition
    SELECT STATEMENT
    SORT GROUP BY
    VIEW SYS
    SORT GROUP BY
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS
    TABLE ACCESS FULL GL.GL_JE_BATCHES
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_HEADERS
    INDEX RANGE SCAN GL.GL_JE_HEADERS_N1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    INDEX UNIQUE SCAN GL.GL_ENCUMBRANCE_TYPES_U1
    INDEX UNIQUE SCAN GL.GL_DAILY_CONVERSION_TYPES_U1
    INDEX UNIQUE SCAN GL.GL_BUDGET_VERSIONS_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_SOURCES_TL
    INDEX UNIQUE SCAN GL.GL_JE_SOURCES_TL_U1
    INDEX UNIQUE SCAN GL.GL_JE_CATEGORIES_TL_U1
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_LINES
    INDEX RANGE SCAN GL.GL_JE_LINES_U1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    TABLE ACCESS BY INDEX ROWID GL.GL_CODE_COMBINATIONS
    INDEX UNIQUE SCAN GL.GL_CODE_COMBINATIONS_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_PERIODS
    INDEX RANGE SCAN GL.GL_PERIODS_U1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES
    INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUES_N1
    INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUE_NORM_HIER_U1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES_TL
    INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUES_TL_U1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUE_SETS
    INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUE_SETS_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    Is there anything i can do in Discoverer Desktop / Administration to avoid this problem.
    Many thanks,
    Lance

    Hi Rod,
    I've tried the condition (Batch Status||'' = 'Posted') as you suggested, but the qeury time is still over 20 mins. To test i changed it to (Batch Status||'' = 'Unposted') and the query was returned within seconds again.
    I’ve been doing some more digging and have found the database view that is linked to the Journal Batches folder. See below.
    I think the problem is with the column using DECODE. When querying the column in TOAD the value of ‘P’ is returned. But in discoverer the condition is done on the value ‘Posted’. I’m not too sure how DECODE works, but think this could be the causing some sort of issue with Full Table Scans. How do we get around this?
    Lance
    DECODE( JOURNAL_BATCH1.STATUS,
    '+', 'Unable to validate or create CTA',
    '+*', 'Was unable to validate or create CTA',
    '-','Invalid or inactive rounding differences account in journal entry',
    '-*', 'Modified invalid or inactive rounding differences account in journal entry',
    '<', 'Showing sequence assignment failure',
    '<*', 'Was showing sequence assignment failure',
    '>', 'Showing cutoff rule violation',
    '>*', 'Was showing cutoff rule violation',
    'A', 'Journal batch failed funds reservation',
    'A*', 'Journal batch previously failed funds reservation',
    'AU', 'Showing batch with unopened period',
    'B', 'Showing batch control total violation',
    'B*', 'Was showing batch control total violation',
    'BF', 'Showing batch with frozen or inactive budget',
    'BU', 'Showing batch with unopened budget year',
    'C', 'Showing unopened reporting period',
    'C*', 'Was showing unopened reporting period',
    'D', 'Selected for posting to an unopened period',
    'D*', 'Was selected for posting to an unopened period',
    'E', 'Showing no journal entries for this batch',
    'E*', 'Was showing no journal entries for this batch',
    'EU', 'Showing batch with unopened encumbrance year',
    'F', 'Showing unopened reporting encumbrance year',
    'F*', 'Was showing unopened reporting encumbrance year',
    'G', 'Showing journal entry with invalid or inactive suspense account',
    'G*', 'Was showing journal entry with invalid or inactive suspense account',
    'H', 'Showing encumbrance journal entry with invalid or inactive reserve account',
    'H*', 'Was showing encumbrance journal entry with invalid or inactive reserve account',
    'I', 'In the process of being posted',
    'J', 'Showing journal control total violation',
    'J*', 'Was showing journal control total violation',
    'K', 'Showing unbalanced intercompany journal entry',
    'K*', 'Was showing unbalanced intercompany journal entry',
    'L', 'Showing unbalanced journal entry by account category',
    'L*', 'Was showing unbalanced journal entry by account category',
    'M', 'Showing multiple problems preventing posting of batch',
    'M*', 'Was showing multiple problems preventing posting of batch',
    'N', 'Journal produced error during intercompany balance processing',
    'N*', 'Journal produced error during intercompany balance processing',
    'O', 'Unable to convert amounts into reporting currency',
    'O*', 'Was unable to convert amounts into reporting currency',
    'P', 'Posted',
    'Q', 'Showing untaxed journal entry',
    'Q*', 'Was showing untaxed journal entry',
    'R', 'Showing unbalanced encumbrance entry without reserve account',
    'R*', 'Was showing unbalanced encumbrance entry without reserve account',
    'S', 'Already selected for posting',
    'T', 'Showing invalid period and conversion information for this batch',
    'T*', 'Was showing invalid period and conversion information for this batch',
    'U', 'Unposted',
    'V', 'Journal batch is unapproved',
    'V*', 'Journal batch was unapproved',
    'W', 'Showing an encumbrance journal entry with no encumbrance type',
    'W*', 'Was showing an encumbrance journal entry with no encumbrance type',
    'X', 'Showing an unbalanced journal entry but suspense not allowed',
    'X*', 'Was showing an unbalanced journal entry but suspense not allowed',
    'Z', 'Showing invalid journal entry lines or no journal entry lines',
    'Z*', 'Was showing invalid journal entry lines or no journal entry lines', NULL ),

  • How to create a CSV file in java

    how to create a CSV file in java

    this is the code that I have used in a hp project:
    private static final String DELIMIT = ",";
    StringBuffer buf = new StringBuffer();
    public void addString(String str){
    buf.append(toEscapedStringLiteral(str.replaceAll(" ","").trim())).append(DELIMIT);
    public void sendFile( String strData ,
                                String strTitle,
                                String strContType,
                                HttpServletResponse res ) throws IOException {
              byte[] _filedata=strData.getBytes();
              res.setContentType( strContType );
              res.setHeader( "Content-Disposition", "attachment;filename="+ strTitle );     
                     DataOutputStream out = new DataOutputStream( res.getOutputStream() );
              out.write( _filedata, 0, _filedata.length );
              out.close();
    public void addStringWhithReturn(String str){
              buf.append(toEscapedStringLiteral(str.replaceAll(" ","").trim()));
              buf.append( "\n" );
    private String toEscapedStringLiteral( String charSeq ) {
              if ( null == charSeq ) {
                   charSeq = "";
              return "\"" + charSeq + "\"";
    ....hope its help
    kou

  • Issue while generating a CSV file through Oracle.

    Hi,
    I am generating a CSV file using oracle stored procedure.
    In an Oracle procedure I need to create a CSV file, which contains the data of a select query, and then emailing this file. Problem is that one of the field contains comma eg ('ABC,DE'). Now in the CSV file 'ABC' is shown in the one cell and 'DE' is shifted to the adjacent cell which is not required..
    Thanks.

    Hi Welcome,
    If you data contains comma then make ~ as your delimeter.
    or repalce all the commas form your data.
    select replace(column_name,',','') from table_name; /* before writing to the file */Regards,
    Bhushan

  • Create a csv file and send it in an email

    In coldfusion, is it possible to  create a csv file and send it in an email, without ever saving that file on the hard drive?

    Yes, you can create an email attachment without writing a file to disk.  This feature was introduced in CF 8.0.1.
    I've posted a sample to a previous thread on the forums.
    http://forums.adobe.com/message/2123297
    See the CFMAILPARAM section of CF 8.0.1 release notes for attachments without a file on disk.
    http://www.adobe.com/support/documentation/en/coldfusion/801/cf801releasenotes.pdf

  • How to create a csv file with NCS attributes?

    Hi
    i installed Cisco Prime NCS and trying to perform bulk update of device credentials with csv file.
    How to create a csv file with all required attributes?
    This is part of NCS online help talking about this topic:
    Bulk Update Devices—To update the device credentials in a bulk, select Bulk Update Devices from the Select a command drop-down list. The Bulk Update Devices page appears.You can choose a CSV file.
    Note        The CSV file contains a list of devices to be updated, one device per line. Each line is a comma separated list of device attributes. The first line describes the attributes included. The IP address attribute is mandatory.
    Bellow is test csv file i created but does not work:
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    The error i am getting while importing this file:
    Missing mandatory field [ip_address] on header line:10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    Assistance appreciated.

    It looks like the IP address field is incorrectly set.,
    It should be as follows
    {Device IP},{Device Subnet Mask}, etc etc
    so a practical example of the aboove could be (i dont know if this is completely correct after the IP address / Subnet Mask)
    10.64.160.31,255.255.255.0,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    below is a link to the documentation
    http://www.cisco.com/en/US/docs/wireless/ncs/1.0/configuration/guide/ctrlcfg.html#wp1840245
    HTH
    Darren

  • When downloading a .csv file in Safari, it adds .xls, making the file filename.cvs.xls

    When downloading a .csv file in Safari, it adds .xls, making the file filename.cvs.xls
    If I rename the file, it opens just fine, if I don't it opens all in one column.
    I had found a fix on my old macbook, but just got a new MBP and it's happening again.
    Can't remember or find where the fix is.
    Thanks!

    Safari: Downloaded file's filename may have an additional extension
    http://support.apple.com/kb/TA24293
    That's from June 11, 2007!
    Working from my defective memory, this happened to me, but stopped if I unchecked 'Open safe files after downloading' in Safari Preferences/General.
    At least I think that's how I stopped it - it hasn't happened since!

  • Creating a CSV file from a pl/sql procedure

    Hi Everyone,
    I would like to know how to write a procedure in pl/sql where i need to check if they are any records in a table say "Table A".
    If they are any records in the "Table A" then we need to write those records in the "Table A" to the CSV file.
    If they are no records then we need to insert a record into the CSV file that "No records are found in "Table A".
    Could anybody please help ?
    Thanks in advance

    see this
    ops$tkyte@8i> create or replace procedure dump_table_to_csv( p_tname in varchar2,
    2 p_dir in varchar2,
    3 p_filename in varchar2 )
    4 is
    5 l_output utl_file.file_type;
    6 l_theCursor integer default dbms_sql.open_cursor;
    7 l_columnValue varchar2(4000);
    8 l_status integer;
    9 l_query varchar2(1000)
    10 default 'select * from ' || p_tname;
    11 l_colCnt number := 0;
    12 l_separator varchar2(1);
    13 l_descTbl dbms_sql.desc_tab;
    14 begin
    15 l_output := utl_file.fopen( p_dir, p_filename, 'w' );
    16 execute immediate 'alter session set nls_date_format=''dd-mon-yyyy hh24:mi:ss''
    17
    18 dbms_sql.parse( l_theCursor, l_query, dbms_sql.native );
    19 dbms_sql.describe_columns( l_theCursor, l_colCnt, l_descTbl );
    20
    21 for i in 1 .. l_colCnt loop
    22 utl_file.put( l_output, l_separator || '"' || l_descTbl(i).col_name || '"'
    23 dbms_sql.define_column( l_theCursor, i, l_columnValue, 4000 );
    24 l_separator := ',';
    25 end loop;
    26 utl_file.new_line( l_output );
    27
    28 l_status := dbms_sql.execute(l_theCursor);
    29
    30 while ( dbms_sql.fetch_rows(l_theCursor) > 0 ) loop
    31 l_separator := '';
    32 for i in 1 .. l_colCnt loop
    33 dbms_sql.column_value( l_theCursor, i, l_columnValue );
    34 utl_file.put( l_output, l_separator || l_columnValue );
    35 l_separator := ',';
    36 end loop;
    37 utl_file.new_line( l_output );
    38 end loop;
    39 dbms_sql.close_cursor(l_theCursor);
    40 utl_file.fclose( l_output );
    41
    42 execute immediate 'alter session set nls_date_format=''dd-MON-yy'' ';
    43 exception
    44 when others then
    45 execute immediate 'alter session set nls_date_format=''dd-MON-yy'' ';
    46 raise;
    47 end;
    48 /
    Procedure created.
    ops$tkyte@8i> exec dump_table_to_csv( 'emp', '/tmp', 'tkyte.emp' );
    PL/SQL procedure successfully completed.

  • How to get fixed field length when download a CSV  file ?

    hi all ,
        I had downloaded a CSV file from an ALV list which created by myself. the current layout of the CSV file is :
    aaa;bbbbbbbbbb;cc;                
                                                         for example . but what i want is :
    aaa         ;bbbbbbbbbbb            ;cc     ; 
    it means these three fields are all with fixed length don't ommitting spaces when you preview the CSV file. how should i do this ?
    best regards
    Kevin

    i got the solution.

  • Data modeler, error when exporting to csv files

    hi, i have a relational model and i need to export this model to csv files, when exporting the model it errors,
    displaying the following error nmessage:
    Oracle SQL Developer Data Modeler Version: 2.0.0 Build: 584
    Oracle SQL Developer Data Modeler Export Log
    Date and Time: 2010-09-21 15:17:17
    Design Name: Diagram
    Model Name: CSV
    Export Finished
    Errors: 1
    Warnings:0
    <<<<< ERRORS >>>>>
    java.lang.NullPointerException
    the issue is a file is missing when exporting proccess is done, the file is DM_CommentsRDBMS.csv, this file contains the commens of columns.
    Thanks.

    Hi,
    I logged bug however information is not enough to locate the problem.
    You can use export to reporting schema in order to get your model exported - in database in that case.
    We are not going to extend "export to CSV file" functionality any further - it'll be as it is now.
    Philip

  • Zero is getting truncated while XI is creating a CSV file

    Hi,
    Scenario is IDOC to File.
    in the IDOC i get some Serial number as 00000007856465 in the output CSV file i need this value as 07856465
    Here when i run this map in the ESR Message mapping i could see 07856465 this value fine but while posting at the output directory the values are dropped with zeros truncated.
    in the output CSV file -- the value is -- 7856465
    Could you please help me out in solving this issue.
    Thanks,
    --Sai.

    Hi Sai Krishna,
    As said by Bhaskar, use Formatnum function or UDF in your mapping. So that you would be able to get the 0's in the output.
    I would prefer to go with FormatNum function.
    Check the UDF provided by Raja Shekar in the below thread:
    UDF for leading zero's in message mapping
    Thanks,

Maybe you are looking for

  • Alv variant

    Hi guru, as I know abt variat that, if I want to save the selection screen fied value..we can save as a variant and after saving we see a button on the app.toolbar and when ever required click on that button...it will fill the same value in the selec

  • Screen not full size with DVD movie

    I have a new iMac and played my first DVD. It was a 16:9 letter box format. The DVD started as a very small picture. I then went to view and set for full screen mode. The movie still only expanded to 70% or so of the screen. Are iMAC not capable of u

  • Java functions with Oracle 10g

    I have browsed through other related message threads on this forum and it seems that the general recommendation is to develop stored procedures and functions using PL/SQL. I need to implement a set of functions that perform date related processing an

  • Best way to achieve multiple paths with quizzes using Captivate 6?

    I'm looking for the best way to achieve multiple paths and quizzes using Captivate 6. Here is the scenario: The learner watches general slides 1 – 3 and then chooses between Path A, Path B, or both paths combined.  If they choose Path A then they wat

  • "SAP Systems" selection not showing in SAPinst welcome screen

    I recently purchased a NetWeaver Development subscription and am following the installation guide for SAP NetWeaver 2004s SR3 ABAP+Java on Windows with MS SQL Server. However, in the Welcome menu of SAPinst under the NetWeaver selection, I am not see