the name of the file created in variable

using oracle 11.2.0.3.0

I have a procedure that creates a CSV on my server. It works perfectly. My question is how to get the file name once the file has been created, and put it into a variable in the same procedure.

create or replace

PROCEDURE 'CSV_GEN' AS

v_wK varchar2 (30);

BEGIN

RUN IMMEDIATELY "ALTER SESSION SET NLS_DATE_FORMAT =" YYYY-MM-DD HH: MI: SS AM "';"

SELECT

Replace(PERIOD_NAME, ' ', '_') IN v_wK

OF TIME_WEEK_V

WHERE SYSDATE-7 BETWEEN PERIOD_START AND PERIOD_END and rownum = 1;

GEN_CSV_FILE

(

"SELECT * FROM WEEKLY_V',

"my_FILES."

"MY_DOCS" |  '_' || v_wK | '. CSV'

);

-so now I have created the file, and it has a name. How can I get this name in a variable, here.

EXCEPTION

WHILE OTHERS THEN

LOG_ERROR();

COMMIT;

LIFT;

END;

Thanks for any help.

Hello

Is that what you want?

PROCEDURE 'CSV_GEN' AS
v_wK varchar2 (30);
    name varchar2 (50);                          -* ADDED *.
BEGIN
RUN IMMEDIATELY "ALTER SESSION SET NLS_DATE_FORMAT =" YYYY-MM-DD HH: MI: SS AM "';"

SELECT
Replace(PERIOD_NAME, ' ', '_') IN v_wK
OF TIME_WEEK_V
WHERE SYSDATE-7 BETWEEN PERIOD_START AND PERIOD_END and rownum = 1;
 
  filename: = "MY_DOCS" |  '_' || v_wK | '. CSV';    -* ADDED *.

GEN_CSV_FILE
(
"SELECT * FROM WEEKLY_V',
"my_FILES."
the file name-* CHANGED *.
 );

EXCEPTION
WHILE OTHERS THEN
LOG_ERROR();
COMMIT;
LIFT;
END;

Tags: Database

Similar Questions

  • What format are the files created by the scanner deskjet 4625?

    I want to buy the Deskjet 4625 CZ284C. but I'm not in the specification of what is the format of the files created by the scanner.

    I need the files in. JPG format and the option so that it takes. PDF format...

    need a quick answer, thanks, Zvika

    Hello

    You can scan to PDF and text can be added to documents, JPG and TIF for images/photos. Please see the following book:

    http://h10032.www1.HP.com/CTG/manual/c03345663.PDF

    Kind regards.

  • Where are the files created in Microsoft Visual C++ 2005 Setup logs?

    Hello

    Where are the installation saves the files created in Microsoft Visual C++ 2005? I checked the temporary directory and couldn't find the logs for Microsoft Visual C++ 2008.

    Thank you!

    Hi EugeneWhitlock,

    The installation files of all installed programs stored in the C:\Program Files location.

    I would also recommend to post your question in the MSDN forum:

    http://social.msdn.Microsoft.com/forums/da-DK/vcgeneral/threads

    Hope the helps of information.

  • I accidentally loaded a .iso file on my PC and can not get rid of it. When I try to delete the file it says that the file is opened by the system. Also the file created 3 virtual drives like E:, F: and G: __Please let me know how I can remove this .iso

    I accidentally loaded a .iso file on my PC and can not get rid of it.  When I try to delete the file it says that the file is opened by the system.  Also the file created 3 virtual drives like E:, F: and G:
    Please let me know how I can remove this .iso file.

    Try Safe Mode. Repeatedly press the F8 key as the computer starts getting the menu diagnosis. Use the arrow key to select Mode without failure. MS - MVP - Elephant Boy computers - don't panic!

  • I have 9, 1 pages in PDF files that are accessible and the need to combine them into 1 PDF file.  I tried adding, adding and the combine process of PDF files. The file created does not take my changes. The file created is partially accessible, but I have

    I have 9, 1 pages in PDF files that are accessible and the need to combine them into 1 PDF file.  I tried adding, adding and the combine process of PDF files. The file created does not take my changes. The file created is partially accessible, but I have to re - the problems that I had fixed in the unique files. I need suggestions on what else can be done, if any. Using Acrobat pro XI.

    By habit, I tend to combine PDF files in the Page pane by right-clicking thumbnails then 'Insert of Pages'-> 'From File'. For me, this preserves the tags of these two documents, although the tags may have to be moved to the correct location (if I remember correctly the tags for inserted pages are put at the end of the tag structure, regardless of where the pages are inserted), if I put the tags in the document to insert into a container as a Section tag It makes the process easier. Travel set of tags in the right place is the only re-fixing that I remember having to do. What behavior you encounter?

    a 'C' student

  • All of a sudden Outlook Express cannot find the files created by the method of attachment.

    Outlook Express cannot find the newly created files to attach. The files are there in My Documents and Outlook Express can still see all the old files, but each new file for the last month is not seen and cannot be attached. I even typed in the name of the file and it says can not find the file of the same name. I send you the files now through 'Send it' a service online, but complicated to use another program. I checked the 'views' and they seem ok. Help, please!

    It is a long shot, but try it in a new identity.

    File | Identity | Add the new identity. Create a new one and try it. If all goes well, you can import your messages and address book from the old identity and delete it.

    Note: Do not use the main word in the name of the new identity.

    How to create and use identities in Outlook Express
    http://support.Microsoft.com/?kbid=209169

    Bruce Hagen ~ MS - MVP [Mail]

  • Copy the files created after a certain date

    How can I copy files that were created after a certain date?

    Thank you

    Hello

    Start - computer or Windows Explorer, you can navigate to a specific folder, then right-click on
    name (or) control position - MORE - Date created column - OK - the box, and then click the Date
    Created column that will align the content of the folder by date ascending or descending as you wish
    (click again to change the order). Then you can click on the 1st file in a sequence and hold SHIFT key and
    Click on the last file in the sequence you want - this will highlight the sequence - then right-click -.
    where in the region of high-lighted and the COPY - navigate to where you want to copy and then right-click
    on paste. To copy a group of files not in a sequence, hold down the CTRL key and click on the ones you want
    COPY that will highlight the files - right-click anywhere in the region high-lit - and then COPY
    Navigate to where you want to copy and click straight on and PASTE.

    --------------------------------

    You can search for files created after a certain date.

    Tips for finding files
    http://Windows.Microsoft.com/en-us/Windows-Vista/tips-for-finding-files

    How to use advanced search in Vista Options
    http://www.Vistax64.com/tutorials/75451-advanced-search.html

    ----------------------------------------------------------

    Win Key F opens advanced search

    Searching in Windows Vista, part 1
    http://Windows.Microsoft.com/en-us/Windows-Vista/searching-in-Windows-Vista-part-1-secrets-of-the-search-box

    Part 2
    http://Windows.Microsoft.com/en-us/Windows-Vista/searching-in-Windows-Vista-part-2-Start-menu-and-control-panel-search-tips

    Part 3
    http://Windows.Microsoft.com/en-us/Windows-Vista/searching-in-Windows-Vista-part-3-using-advanced-search-for-those-hard-to-find-files

    I hope this helps.

    Rob Brown - MS MVP: Bike - Mark Twain said it right.

  • Enter the location of the file in a Variable of the ODI

    Dear gurus,

    I have a scheme of file where Directory - schema and the schema of work based on the same location.

    I want to capture the location in a variable.

    Could you please suggest how to achieve?

    Thank you

    Sébastien

    PS: I am unable to use/create query for < % = odiRef.getInfo ("SRC_SCHEMA") % > function on the logical schema file in a variable.

    Hi Roger Chatterjee90,

    What about this:

    SELECT '<%=odiRef.getSchemaName("", "D")%>' from dual
    

    It will be useful.

    Kind regards

    JeromeFr

  • I can't open the files created by Microsoft Works. I have windows 7 Professional installed and xp

    I have files dating back to 1994, that were created by using Microsoft Works.  I was able to convert all the older spread sheet files on my old computer that was not recently.  Microsoft XP was installed with Microsoft Office 2007, on my old computer.  I saved the original files, but cannot open them on my new computer, which also contains Microsoft Office 2010.  Are there programs of conversion which converts files more ancient works in Word and XLR 2010 formats?

    See http://www.microsoft.com/en-gb/download/details.aspx?id=12 and http://www.microsoft.com/en-gb/download/details.aspx?id=7264.

    Also, the last point of http://www.computerhope.com/download/updates.htm, but does not work with Office 2000.

    OpenOffice http://www.openoffice.org/ and/or LibreOffice http://www.libreoffice.org/ may be able to open and convert the files. Try an older version if the versions cannot open files.

  • Print in the file creates files that I can not open

    I feel in a file, and the file suffix is 'pdn' not 'pdf '. Then, I'm unable to open the file, an error message.

    In addition, when I create the PDF file on the Adobe Web site, about 50% of the time the original layout of the elements of text and image are scrambled around on the pdf version.

    Help!

    I pay every month for a service that was 50% functional!

    Thank you Sara for your entry. I found the function "save as pdf" and

    which works great!

  • Download the file created from BLOB (as opposed to open in the browser)

    Hello, everyone.

    This project is really pushing me to become familiar with many functions, that I have never worked with before.

    The question this time:

    If I have a database table that contains the files (and these may be, PDF, TXT, DOC, XLS, or PPT) and want to allow a user to download and save a particular file (as opposed to opening the file in the browser), how can I get it?

    If the file exists on the server, which would be quite simple.  But if it is created on the fly via BLOB data?

    V/r,

    ^_^

    Yes, assuming that the BLOB is in the right binary format.  Like this:

  • Decompile the files created in Authorware

    I only have a .exe file that is created in Authorware 7 (as well as other files that was created after the publication it such as.) DLL. U32 and X 32).

    Is there a way to decompile the .exe file (in a file .a7p or can I go back and change)?
    If not, is there any suggestions?

    Thanks in advance

    There is no guarantee that you will be able to recover the file, but it
    is worth it.

    How long it has been deleted? He has been, less you
    can recover.

    access the www.download.com and search for Pandora Recovery.

    Note that this installation on your hard drive will increase the
    probability that you will destroy the file (if it has not been more)
    written already). Your best bet is to stop using the computer
    immediately, install Pandora Recovery on another computer, add the hard drive
    ride with the file removed to another computer and try to recover.

    This is the best bet. If you do not want all can move forward and
    Install Pandora on the same computer and hope for the best.

    V1ck1_D wrote:
    > -Dave,
    > Who was actually the first thing I wanted to do.
    > Do you know any software that I can download that will allow me to recover the who
    > file?
    > Thank you
    >
    >
    > - Thank you Amy. I thought that's what I have to do.
    >
    >
    >
    >

    Quote:
    Posted by: newsgroup user
    >
    > Have you checked the trash? There are tools that can help you
    > get the file.
    >

    >
    >
    >

  • Open the file created on Mac crashes on Windows

    Same version of first CC and it is a very small project.

    Closer to you, I do open was important as a new project, but when I tried to open the timeline, the accident occurs. I copied the files on usb, HDD external and then copied on my local disk. I deleted all the files in cache and then received the "Missing Renderer" message, but it still crashes. It's something in the timeline panel. But what? I can take the same file to a MAC and open it without problem.

    Hi Brucel,

    Same version of first CC and it is a very small project.

    Closer to you, I do open was important as a new project, but when I tried to open the timeline, the accident occurs. I copied the files on usb, HDD external and then copied on my local disk. I deleted all the files in cache and then received the "Missing Renderer" message, but it still crashes. It's something in the timeline panel. But what? I can take the same file to a MAC and open it without problem.

    Import this file into a new Premiere Pro project.

    But before you open the calendar, please change video renderer only in software mode.

    Click file > project settings > General and change of video rendering "Software Only Mode" and delete previews

    Thank you

    Ilyes Singh

  • Can ODI - I get the name of the file in a variable?

    Hello, I am trying to get the name of the folder (or subfolder) dynamically over the package that is currently running. I tried various API (from the Toolbox) calls including < % = odiRef.getSession("SESS_NAME") % >, but this isn't quite what I need.  I'm real new to ODI...

    I'm under ODI 11.1.1.6

    Thanks in advance.

    CL

    Yes, I think that this decision if more flexible. I use this way.

    . or you could hold information about the records in the table or XML file or a properties file and store it in the variable... It depends on your tasks and objectives

  • Location of the file created by the APEXExport utility

    Greetings,

    I did experiments with the APEXExport utility in a Unix environment. I work for export and it creates the SQL export file in the current working directory. What I want to do, it's the SQL file that is created in one directory other than the current one.

    The directory where the export utility is here:
    /u01/apex402/apex/utilities
    With this as my current directory I have run this command, and all works well.
    java oracle/apex/APEXExport -db candy.us.oracle.com:1521:ORCL -user scott -password tiger -applicationid 31500
    If I move to another directory and run a command like this, it does not work.
    java /u01/apex402/apex/utilities/oracle/apex/APEXExport -db candy.us.oracle.com:1521:ORCL -user scott -password tiger -applicationid 31500
    Any help would be greatly appreciated.

    Thank you

    Larry

    Hello Larry,.

    the problem is the namespace Java. To find the class, it must be in the appropriate directory. You can move or copy the oracle to any other location directory and use the same call here. I did something different, as I don't like to copy things: I created a jar file and added to my classpath. To do this on your machine, run the following commands

    cd /u01/apex402/apex/utilities
    jar cf APEXExport.jar oracle/
    export CLASSPATH=$CLASSPATH:/u01/apex402/apex/utilities/APEXExport.jar
    

    Of course, you can move or copy APEXExport.jar to a different directory, for example / usr/local/lib + and include this directory in your CLASSPATH.
    From this moment, you can call

    java oracle.apex.APEXExport -db candy.us.oracle.com:1521:ORCL -user scott -password tiger -applicationid 31500
    

    of any directory.

    -Udo

Maybe you are looking for

  • Shared variables problem

    Hello I'm using LabVIEW 8.5.I uses about 80 variables shared in my project using Datasocket also to write on the network wanted to know if I face any problem while doing the exe? What I have to follow a special procedure to generate exe? Help, please

  • Lenovo Y 410 - battery doesnot - shows 100%, but dies when disconnected

    Hello I have a Lenovo Y410 model, purchased in Nov 2007.It was my mobile favorite and best I've ever used. Only since the last morning, suddenly, the battery doesn't work. On power options the battery meter shows 100%, but when I unplug the power sup

  • WRT54GS is Compatible with Windows Vista?

    Anyone know if the WRT54GS router is compatible with Windows Vista? I want to remove the router from a PC running XP and move to an area using Vista. If it is compatible, I have more startup CD. The necessary drivers and firmware downloaded from the

  • Failure to print Dell 1320c

    Get the blinking (!) and note (user intervention required) in the dialog box. Replaced the low black print cartridge. Still will not print. Help!

  • How to create a hidden for a spy app process

    If you want to create processes background hidden for a spy app for example how would you do it? I want to have a process with no interface user, no icons, not visible in the Task Manager, not appearing is not in Manager of application etc. Which of