Writing ouput to the next column in a .csv file

I am Writing to .CSV file with PL/SQL code:
CREATE OR REPLACE PROCEDURE Write_File(p_name IN VARCHAR)
AS
BEGIN
DECLARE
CURSOR emp_sel IS SELECT ename,hiredate FROM EMP;
file_name VARCHAR2(20);
output_file utl_file.file_type;
BEGIN
file_name:= (p_name||'.csv');
output_file:=utl_file.fopen('d:\test_dir',p_name||'.csv','W');
FOR i IN emp_sel LOOP
utl_file.put_line(output_file,'NAME:'||i.ename);
utl_file.put_line(output_file,'hire Date:'||i.hiredate);
END LOOP;
utl_file.fclose(output_file);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(SQLCODE||SQLERRM);
END;
END;
Just wanted to know how Move to the next Column in the .csv file.
at present the ename and hiredate r written in the 1st Column C1 column.
I want to write the hiredate data in C2 column.
how to?

user545846,
I answered you in the other thread:
Re: Calling utl_file package from a java program
Good Luck,
Avi.

Similar Messages

  • I can't sort a single column only (ignoring the next column)

    I can't sort a single column only (ignoring the next column) in NUMBERS

    Numbers sorting follows a database model in which each row is a 'record' rather than a collection of unrelated data items. When a table is sorted, the integrity of the individual records (rows) is maintained.
    If you need to sort a single column, that column (or its data) must be separated from the rest of the table.
    That can be done using copy/paste (as described above by Wayne), or by taking the column to be sorted out of the table, dropping it on the sheet to form a new, single column table, doing the sort, then returning the column to the original table.
    The 3 1/2 step process takes longer to describe than to do.
    Regards,
    Barry

  • What is the keyboard shortcut to move text to the next column?

    What is the keyboard shortcut to move text to the next column?

    Glad you got it fixed.
    Remember these boards cover a lot of different applications and systems. The more information you put into your post the better the chance of getting it resolved
    regards

  • How can i select the next column instead of next row when press enter key

    I need to know how can i select the next column instead of next row when i press the enter key.By default ,when i press enter key the next row is selected and the column remain unchanged but I wants opposite that is the row should remain unchanged but column index will changed.
    Thanks to all.

    Well, the right arrow key will already move you to the next column, so the easiest way to do this is to modify the InputMap to have the Enter key invoke the same Action as the right arrow key.
    You can search the forum for my "Table Actions" (without the space) example that will show you how to do this.

  • Why is Docs to go allowed to be sold as being able to function on IPAD3. The columns were blleding into the next column header and could not be accessed. Going into one cell gave me the forumula 4 cells down. Absolute rubbish. Moved to Quick Office PRO HD

    I purchased Docs to GO Premium as it was suppose to work on IPAD 3. On loading a spreadsheet the columns under the header columns (ABC etc) started to blled into the next column. It does not work on IPad 3.
    I swithced to Quick Office Pro HD. Absolutely fantastic App. I would love to get my money back for Docs to Go Prem (Rubbish)

    Send your complaints to the developer. This is not the venue for them.

  • I am setting up a Numbers table for gas milage using one column for gallons divided by the next column of miles and having the answer in the third column in miles per gallon.

    I am setting up a Numbers table for gas milage using one column for miles and the next column for gallons, the two to be divided to produce the third column of miles per gallon and am unable to find out how to do that.  Add and/or subtract, yes, but not to divide.

    ...and results in yield signs indicating an error:
    Hi Wayne,
    Yield signs must be different in Texas. Here (and in much of the rest of the world) they're white with a red border, and installed with an apex pointing down:
    Some still include the word "Yield" (or in Quebec, "Cedez"in black letters.
    Maybe you're thinking of the "Warning triangle", which is similar, but installed base down, and often including a symbol in the white space:
    These are more common in Europe, with the exception of the portable version, which I've seen used at road construction sites or as 'flares' to warn of a disabled vehicle on the road.
    Or maybe you were thinking of this
    (Most of these 'slow moving vehicle' triangles have an orange center. This one looked a bit more 'Texas,' though.)
    Cheers,
    Barry

  • When sorting a column of alphanumerical, how do I get them to stay sorted?  When I go to the next column, the first column mixes up.

    How do I get a column of alphanumerical to stay sorted?  When I go to the next column, my first column gets mixed up.

    For my purpose, I'll have to go back to Excel.
    What is your purpose?  Note that Numbers 3.0 does not have a multicolumn sort interface the way you have in Excel (or Numbers 2.3). But it is generally easy to accomplish what you need to do.
    Say you have a column A on which you want an alphanumerical sort and within that you want to sort by B (the equivalent of Excel's "Sort by" A "Then by" B).
    First do a single column sort by B. Then do a single column sort by A.
    SG

  • Preview: In a group of PDF files in the same window, going to the next or a previous PDF file displays the bottom of PDF by default, not the top. How do you change this?

    Preview: In a group of PDF files in the same window, going to the next or a previous PDF file displays the bottom of PDF page by default, not the top of the PDF page. How do you change this? In Mac OS 10.9 and previous, going to the next or previous PDF file displays the top of the PDF by default. Is there a way to change this back? When I go to the next or previous PDF file, I want to first view the top of the page, not the bottom. This really doesn't make any sense. Any help? Thanks!
    MacBook Air (13-inch, Mid 2012)
    2 GHz Intel Core i7
    8 GB 1600 MHz DDR3
    500 GB Flash Storage
    Preview Version 8.0 (859)
    Mac OS 10.10.1

    That to me seems like a bug in Yosemite.
    Apple Feedback http://www.apple.com/feedback/
    Bug Reporter https://bugreport.apple.com/

  • SQL*Loader - How to load only a few columns from a .csv file to ora table

    Hi there,
    Could anyone please let me know how to load few columns from a .csv
    file into a oracle table using SQL*Loader.
    I know how to create a .dat and .ctl file and run the sql loader.
    Suppose I have a .csv file with
    col1, col2, col3, col4
    and I only need to load col1 and col3 into col_a and col_b respectively
    in table_a?
    structure of table_ a
    col_a,
    col_b
    Please advice

    Try like..it i will work..
    LOAD DATA
    INFILE 'test.txt'
    LOAD DATA
    TRUNCATE INTO TABLE T1
    FIELDS TERMINATED BY ','
    (col1,
    col2 FILLER,
    col3,
    col4 FILLER
    )

  • How can we a validate a CSV file in SSIS and log the error details in another CSV File by using Sript Task.

    How can we a  validate a CSV file in SSIS and log the error details in another CSV File by using Sript Task.

    Please see:
    http://www.bidn.com/blogs/DevinKnight/ssis/76/does-file-exist-check-in-ssis
    http://social.msdn.microsoft.com/Forums/en-US/01ce7e4b-5a33-454b-8056-d48341da5eb2/vb-script-to-write-variables-to-text-file

  • What formula to add up the values in one column only if a box is checked in the next column?

    Hi guys,
    I am creating a spreadsheet for my wedding guestlist.
    In one column I have a number to tell me the total number of adult guests the party (e.g fried and girlfriend = 2) and then the next two colums are check boxes, one for daytime and the next for nighttime.
    What I would like to do is in a footer row under the daytime time checkbox column is to total the first colum (the total number of wedding guests in each party).
    I hope that I am explaining this ok, sorry if it is vague.
    I understand to use COUNTIF to total the number of checked boxes in the column and have been working on COUNTIF + the sum of the previous column but it's not really working.
    Any help will be greatly appreciated.
    Thanks,
    Phil

    Phil,
    Here's an example of what you might do:
    The expression in the footer of column B is:
    =SUMIF(B, TRUE, $A)
    and, the expression in the footer of column C is:
    =SUMIF(C, TRUE, $A)
    Regards,
    Jerry

  • How to tab to the next column from af:inputComboboxListOfValues by clicking on 1 tab

    Hi,
    I am using Jdeveloper 11.1.1.6.0. I have a table in which my first column is af:inputComboboxListOfValues(lov is created in the model)  and the next is a text box. Even when i type a correct value and press tab from the af:inputComboboxListOfValues the control doesn't set the focus on the next inputText component. Is this a default behaviour of the component or can we control it by using some property.

    If Firefox is closed and an external link opens Firefox, you need to go to History > Recently Closed Tabs and open those tabs before closing Firefox. If you don't the "previous session" will be gone and only the one page that the external program opened will be the new "previous session".
    If that isn't satisfactory, you'll need to install a "session manager" type extension to remember more than "the last session" only.
    [https://addons.mozilla.org/en-US/firefox/search/?q=session+manager&appver=any&platform=WINNT AMO search for "session manager"]

  • How can i get the column names in CSV file.

    Hi,
    After execution of infospoke i can not see the column names in that file.How can i get column of respective infoprovider?
    Thanks,
    Gananadha Lenka

    Hello Gana,
    Actually while exporting the data using Info Spoke, we have the possibility to modify the data that we send. This is possible using transformations.
    In your Info Spoke, you have a tab called Transformations.
    Here you need to create an implementation and then use BADi to populate data.
    Check if you can write a start routine sort of thing here and insert a new record into the internal table by hardcoding with your field headings.
    Let me know if you dont know how to create transformations.
    Kris...

  • I enabled the "kind" column and saw different file formats - Why?

    I just happened to enable the "kind" column in Itunes and see my songs have several different file extensions such as AAC Audio file, MPEG Audio file, Protected AAC Audio File, Purchased AAC Audio File,and WAV audio file.
    Is this O.K.? What does the file type mean to me?

    Yes, it's OK.
    Protected AAC Audio means itunes purchase with DRM,
    Purchased AAC Audio means itunes Plus without DRM,
    MPEG audio means MP3,
    WAV means just that, WAV
    Here is a wiki on audio file formats to get you started, if you want to learn more.
    http://en.wikipedia.org/wiki/Audiofileformat

  • How to add time informatio​n to the first column of spreadshee​t file?

    hi all.
    how to add time information to the first column of spreadsheet file?illustrated in the figure below。
    Solved!
    Go to Solution.

    You need to take the time data and convert it to double.  But Excel data is based on days since 1/1/1900 while LabVIEW data is based on seconds since 1/1/1904.
    Take a look at this thread for an example I posted on how to make the conversion.
    One other possibility is to convert your numeric data to a string, and build on an array of time that is also a string version of the timestamp.  Then write your 2-D string array to the Write to Spreadsheet file.

Maybe you are looking for