How the coil with the variable?

I need the motion of the coil with the variable filename.
Concept as below:
select HOST_NAME||'_'||INSTANCE_NAME||'_'||to_char(sysdate,'YYYYMMDD_HH24MISS')||'.txt' as Filename from V$INSTANCE;

SPOOL c:\&Filename;
When I run this script it will ask to input 'filename '.

Please suggest.

Kind regards
Suradech

There are many examples to achieve...

http://tinyurl.com/2f7ukdr

However, why the spool SQL * more to get an outing in the files, when you can export within PL/SQL to achieve the same and then dynamic file names making is really easy.

Tags: Database

Similar Questions

  • How the variable in the data area?

    in the XML file, I have

    < list >

    < event_id > EMB10 < / event_id >

    < col1EMB10 > ALL < / col1EMB10 >
    < col2EMB10 > 0 < / col2EMB10 >

    HON < col1EMB10 > < / col1EMB10 >
    < col2EMB10 > 1 < / col2EMB10 >

    < / list >

    < list >

    < event_id > EMB11 < / event_id >

    HON < col1EMB10 > < / col1EMB10 >
    < col2EMB10 > 1 < / col2EMB10 >

    < / list >


    I want the datagrid control to display above value.

    When the drop-down list select event_id EMB10, the data area should be as below
    dataField = "col1EMB10."
    dataField = "col2EMB10."

    I did, but they do not work:

    dataField ="

    col1 | "| {cboActivities.selectedItem.event_id} |' "

    dataField ="col2 |" | {cboActivities.selectedItem.event_id} |' "

    Pleas help!
    Thank you in advance!

    It is also as expected.

    You have to the first grid:

         ALL THE
    0
    HON
    0
    Of course, you can say you want 2 lines in the result and it looks like this:
    ALL THE | 0
    HON | 0
    But it is unclear what col2YUD09 should be with what col1YUD09. In this example, you have two 0, so there is no difference. If you have
    ALL THE
    1
    HON
    0
    What should be the result?
    ALL THE | 1
    HON | 0
    or
    ALL THE | 0
    HON | 1
    ???
    There is no any order in xml!
    Data should be as
    ALL THE

    1

    HON
    0

    And dataProvider - cboActivities.selectedItem.item

  • How to trace the greatness of the variables compared to the timestamp with evenly spaced samples in time?

    Hello world. I need to trace the variable amplitudes compared to the timestamp (date and time), but the time intervals between samples are not equidistant. In my area, this is called trend plot. I'm surprised that Labview does not a vi to do this. The only solution that I found so far is to save the data in an Excel file and open this chart in Excel because it has the ability to trace what that this is against what whatsoever is not limited to something as even spaced samples. How to achieve this is Labview? A graph of waveform vi would be perfect if it was not by the fact that it works with even spaced samples.

    Thank you.

    Paulo Siqueira

    Your requirement is directly possible with LabVIEW.

    You can spend time to understand the difference between 'Chart', 'Graph' and "Graph XY".

    VI attached is drawing samples of unequal time.

    Hint:-right click on the 'XY' graph-> properties-> display-> 'Axis of X' = absolute time Format

    Kind regards

    Yogesh Redemptor

  • How to use the command the reel with Bind Variables

    For the next REEL, I want the GEN_DATE to be entered by the user at the time of execution of the SQL Script. Is this possible in the command of the COIL.


    the colsep value,-separate the columns with a comma
    set pagesize 1000 - get rid of disturbing - between pages
    set position-the title of column Print
    Set trimspool on - remove the spaces to the right. eliminating spaces until eol
    set linesize 700 - line size should be the sum of the column width
    coil spool_results.csv
    SELECT *.
    OF GUI_SITE_JOURNAL
    WHERE GENDATE_ BETWEEN ' 2012-11-01 00:00:00:00000' AND ' 2012 - 11 - 02 00:00:00:00000'* ORDER BY GEN_DATE;
    spool off;

    The reason is to give the opportunity to the user so that he can enter any beach without changing the code of the script.

    Can someone help me please.

    Published by: user10903866 on February 18, 2013 19:44

    Hello

    user10903866 wrote:
    For the next REEL, I want the GEN_DATE to be entered by the user at the time of execution of the SQL Script. Is this possible in the command of the COIL.

    Do you want user input in the command of the COIL, or want you she in the query?

    the colsep value,-separate the columns with a comma
    set pagesize 1000 - get rid of disturbing - between pages
    set position-the title of column Print
    Set trimspool on - remove the spaces to the right. eliminating spaces until eol
    set linesize 700 - line size should be the sum of the column width
    coil spool_results.csv
    SELECT *.
    OF GUI_SITE_JOURNAL
    WHERE GENDATE_ BETWEEN ' 2012-11-01 00:00:00:00000' AND ' 2012 - 11 - 02 00:00:00:00000'* ORDER BY GEN_DATE;

    What are the data type gen_date of the oif?
    If it is a string, it is a big mistake. Information about the dates in the DATE columns belongs.
    If it's a DATE, so don't try to compare strings, such as "2012-11-01 00:00:00:00000'."

    spool off;

    The reason is to give the opportunity to the user so that he can enter any beach without changing the code of the script.

    Can someone help me please.

    One way to do that is with substitution variables:

    ...
    SET     VERIFY  OFF
    
    ACCEPT  start_gen_date     PROMPT "Starting date (e.g., 2013-02-18 23:00:00.00000): "
    ACCEPT  end_gen_date     PROMPT "Ending date   (e.g., 2013-02-18 23:59:59.99999): "
    
    SPOOL  spool_results.csv
    
    SELECT    *
    FROM        gui_site_journal
    WHERE        gen_date  BETWEEN '&start_gen_date'
                    AND     '&end_gen_date'
    ORDER BY  gen_date;
    
    SPOOL  OFF
    

    There are security considerations. Variables substitution to the devious users the power to issue a SQL, such as DROP TABLE command. Users with SQL * Plus access already have this power, anyway.

  • How to fill out the "to:" line with a variable email address?

    I'm new to coding and am not sure how to ask my question. I have a link in an 'Email' symbol that I would like to have the window open to a 'mailto', but there are several instances of that symbol on the timeline, each using a different email address. If the [symbol]. Email.Click code reads as follows:

    Window.Open ('mailto:'+ sym.getVariable = ("emailWindow"), "_self")

    and the line in the Stage.creationComplete code that is supposed to call the variable code reads:

    sym.getSymbol("Details_David").$("Email").html ("[email protected]" "").setVariable("emailWindow","[email protected]");

    With this code, the browser opens a window of mailto, but the ' to: ' line readings, "indefinite".

    Either in the [symbol]. Email code. Click, I have:

    Window.Open('mailto:"emailWindow"',"_self")

    without the "emailWindow" as the variable name, the "to:" line to the mailto line reads, "emailWindow".

    How to fill out the "to:" line with a variable email address?

    Otherwise, it works better:

    1)

    replace

    sym.getSymbol("Details_David").$("Email").html ("[email protected]").setVariable("emailWindow", "mailto:[email protected]");

    with

    sym.getSymbol("Details_David").$("Email").html ("[email protected]");

  • How to use the variable in the coil

    How can I draw a sequence number of the database and use it in a sqlplus spool file name...
    This forum works as: sqlplus user/pass@sid@c:\file.sql

    sample file:

    BEGIN
    declare

    V_E_NUMBER varchar2 (7);

    Start

    Select "E" | LPAD (RWP. E_NUMBER_seq. NEXTVAL, 6, '0') IN THE DOUBLE V_E_NUMBER;

    end;
    end;

    Select "E" | LPAD (RWP. E_NUMBER_seq. CURRVAL, 6, '0') IN THE DOUBLE V_E_NUMBER;
    trigger the echo
    SET THE POSITION
    SET LINESIZE 430
    set verify off
    SET PAGESIZE 0
    SET TRIMSPOOL ON
    SET OFF calendar
    SET termout ON
    SET feedback OFF
    coil d:\securedASP\CORE. BU34500.AR.'|: V_E_NUMBER |'. RECEIVD
    Select * from table;
    spool off

    Hello

    Use a substitution for that variable:

    COLUMN     v_e_number     NEW_VALUE v_e
    
    SELECT   'E' || lpad ( RWP.E_NUMBER_seq.NEXTVAL
                        , 6
                   , '0'
                   )          AS V_E_NUMBER
    FROM    DUAL;
    
    SPOOL  d:\securedASP\CORE.BU34500.AR.&v_e..RECEIVD 
    

    Note that this does not at all use PL/SQL.

    The variable can be used without quoting or concatenation.
    Which can lead to situations where it is ambiguous as to which is part of the name of the variable (the variable is named ve in this example), and what is literal text that happens to come right after him. To resolve these issues, use a point to mark the end of the variable name.
    In your case, you want a literal period just after the variable name, use two: one marks the end of the name, and the other is taken literally.

    Get the SQL * most orders
    COLUMN,
    The VALUE of CONCAT, and
    SET
    For more details.

  • How to replace the variable with the help OF the operator?

    Hello

    I'm creating a form where the user selects the check box which products he wants to see. After the choice, I should show all sales of this product, but the selection does not recognize the variable after the IN operator, for example:

    SELECT the product, price, quantity
    FROM the sale
    Product WHERE IN (vcProducts);

    Can someone help me?

    Cree

    I guess that vcProduct is a varchar2 variable where you have a chain of your prodids, as ' 4711,4712 concatinated, 4713'. May be you have each place value '. Is not the question, which is not part of the sql syntax set. You either have a list of enumeration or a subselect.

    Where do you need it? In the block or Pl/Sql where clause.
    In the latter case, you can configure the list in a variable (with enclosing "") and set the block where property.

    In the first of may by INSTR is useful, INSTR (vcProduct, vcDelim | table.prod_id | vcDelim) > 0. Make sure you have your list attached and separated by the vcDelim. If you prodct table with the number of lines (million), it can be slow because no index will be used.

    Dynamic sql or.
    Or write a subquery und temp-table.

  • How to create a Global Variable through the Project Explorer

    Hello world!

    I know how to create a global variable (in a vi through the range of functions...).

    but I'm missing a way to create one via the Project Explorer.

    It's a missing feature or just this documentation (and the intuition of myself) are missing?

    It would be very convenient.

    THX for your time and hope that answers.

    jwscs

    Right click on my computer > new > new... > select Global Variable.

    EDIT: although I agree with Gerd (he probably wondering why you need so we can recommend a better way ), I rarely use them in easy to write once - read many applications such as security levels overall program at initialization (VER) to read later, but NOT modified.  I know it would be better to make a good class, functional Global Variable (FGV) or a motor Action (AE) but globals ARE practical and safe IF used wisely.

  • How to set the variable USERPROFILE of another user?

    I have the main account that I use and an admin account to call anytime, that I need (for security system). I recently came across problems with repartition my hard drive (it's a bit difficult to change the size of the partition between a basic volume and an extended volumes, even with a third-party utility that performs its work until Windows starts and wanted to completely pass the two user profiles (and preferably both program files)) (, but I can't even more with after discovering that most of my programs have themselves out of their expanded paths and not system variables linking the search through the registry) for the extended partition. I was trying to see if I could do that through a batch file (whose content I have so far for the non-admin will be shown below after this post), but I can't find anything in the registry that I could change. My question is twofold:

    1. I try to take the right path by using a batch script to move the two users? If I did do something wrong and if so, what?
    2. How could I put a variable user for another user on the same system? (It is a continuation of question 1)
    3. (Second question) Is it possible to move my programs Program Files/Program Files (x 86) runs on my D: drive and operate them out of that? I was also wanting to have just my system files and similar to run on my C: drive, because of the drastically limited space. The only exceptions to that would be the dozen of programs that are installed in the folder root (aka C:\whatever).
    I tried repartitioning earlier, because I wanted to make room for my C: drive D: drive much smaller to create many more. Here are the sizes of partition for each partition on my HARD drive:

    • 100 MB (OEM Partition)
    • 9.77 GB (recovery Partition)
    • 58,59 GB (C:, OS, 6,49 GB drive left... not enough for me to copy it to my iTunes songs about library 1 200 on it from my old netbook)
    • 229.63 GB (D: drive, too much for my tastes here)
    I wouldn't mind if I ended up having to save my D: drive format before that, but I don't know how useful it would be.

    Code for the batch file (I named it moveuser.bat)
    (the first line and the last two lines are to refuse to execute the batch file and DO NOT EXECUTE comments)
    GoTo EOF
    cmd
    title moveuser.bat
    MD C:\TEMP\cmdtmp
    MD "D:\From C\Users\" " " ".
    MD 'D:\From C\Program Files files.
    MD ' D:\From C\Program Files (x 86) \Common Files.
    CD C:\Users\Isiah
    Robocopy ".» "------" "D:\From C\Users\" /e /mt:2 /copyall /dcopy:t /tee /log:C:\TEMP\cmdtmp\tmp.txt ".
    set USERPROFILE = "D:\From C\Users\""" "
    CD appdata\local
    RD ' virtualStore\program files (x 86) \aura4you "/s /q
    CD C:\TEMP
    RD /s /q cmdtmp

    : EXPRESSIONS OF FOLKLORE
    REM 'DO NOT RUN. "

    Your system is too complicated. If you implement it then it'll keep you causing pain. Much better to keep things simple as follows:

    • Move the 'My pictures' folder on the D: drive.
    • Move the 'My music' folder on the D: drive.
    • Let your profiles on the C: drive.
    • Let the program files on drive C:, if only because many setup programs will create their files in "C:\Program Files (x 86)" instead of using the % ProgramFiles (x 86) % as they should.
    This approach will free a lot of space on the C: drive. It will also allow you to put your iTunes library on the D: drive.
    A few comments on your batch file:
    GoTo EOF
    cmd
    . . .
    : EXPRESSIONS OF FOLKLORE
    ': EOF ' is a built-in label that references at the end of the batch file. You jump to it as follows: goto: eof. Have a line of the form
    : EXPRESSIONS OF FOLKLORE
    interferes with the integrated label. Get rid of it!
    The "cmd" line is not necessary and will have unexpected side effects. Get rid of it.
  • In vCO how separate you the display of the value of the variable value

    I use Orchestrator 5.5 and I would like to create a way to present a value to the user when they start the workflow, and then set the variable to something different. For example when you select the operating system for your comments, you are supposed to choose VirtualMachineGuestOsIdentifier. It is a little more of the average skills users and quite frankly something I want to keep track of is.


    Is it possible to do something like in HTML? < option value ="winNetEnterpriseGuest">Windows Server 2003, Enterprise Edition<option/option/option>


    Hello

    don't know if you can do more kindly, but how about giving users a drop-down selection fall and correspond to the GuestOSIdentifier with a switch statement in a following script task?

    Tim

  • How I wear on the variables in the database of a page to another?

    I have a MySQL database displayed in a table on one page, with a link in each row, pointing to a DETAILS.php page where I want to show the end user all the details of this record or a line item in a different format. After that I have a link to the new page, how should I address variables for "this particular record" clicked on in the 1st page? What is the system automatically knew which record of the row in the table that I linked to?

    lesliebrownadobe wrote:

    I have a MySQL database displayed in a table on one page, with a link in each row, pointing to a DETAILS.php page where I want to show the end user all the details of this record or a line item in a different format. After that I have a link to the new page, how should I address variables for "this particular record" clicked on in the 1st page? What is the system automatically knew which record of the row in the table that I linked to?

    Each record in your database must have a "unique" identifier (primary key), tying the record to it.

    You then pass this "unique identifier" to the details page in the link that you create using php for loop through each record found in the database, which no doubt you already have.

    On the details page then use you php to get the id of the file sent to the page via the link:

    $id = $_GET ['id'];

    Once you have the id that you are in business and can create a mysql on the database query to get the record corresponding to the code

    SELECT * FROM table WHERE id = "$id".

    'id' is the 'unique' field in the database that identifies records and the "$id" being the variable passed from the link

  • How to check that the variable 'does not contain' value?

    Hello

    I use CP 7.0.1.237.

    We want to use the widget text box for a custom quiz and verify a response. While we understood how to check the existence of certain key words, we are not able to find a way to check that the content does NOT contain certain keywords. For example, we want to ensure that the text entered in this widget does not contain a "Transformation" and "Non-compliant.

    Is this possible at all?

    Thank you

    Anthony

    Anthony, it works perfectly. Created this conditional action with 4 decisions. I used the interaction of training text scrolling in CP8 (because now you can control the variable - which means I might have a Reset button):

    First decision:

    Second decision (the third is similar to the following)

    Fourth and final decision

    I put the variable words (v_first... v_fifth), it's a reflex I use since I shared actions that much. The variable associated to the ETB (you can now reset an empty var in CP8) is v_TextArea and the Boolean value that will decide if positive feedback (StarOK) should be shown is v_TA_OK. If you want to display a negative feedback, put this in the ELSE part of the final decision.

    FYI: it took 15 minutes, including the creation of assets and the variables and tests. Personally I would have needed more time to do it in JS, but that's just me.

    Lieve

  • PowerCLI Invoke-VMScript re - ip guest - how to get the variable hostname comments

    I run the following script as a task Post-Power-we a re - ip our VMs after that MRS. them rocking.  I was able to run this script successfully without the variable hostname of comments (in the test, he runs a script by test VM with the hostname assigned...), but I'm stumped on how to get comments variablized according to the machine's host name works on, it will take the host name and use it in the GuestUser variable and the command - VM.  I tried the bold part, but it does not work.

    $srv = Connect-VIServer 10.0.0.10 - administrator of the username-password password

    $Hostname = (get-wmiobject win32_computersystem). Name

    $script = "%windir%\system32\cmd.exe/c c:\dr\drIPsettings.bat".

    $HostUser = "root".

    $HostPassword = "password"

    $GuestUser = ' $Hostname\Administrator '.

    $GuestPassword = "password"

    $ScriptType = "bat".

    SE connect-VIServer 10.0.0.10 - Session $srv. SessionID

    Invoke-VMScript - ScriptText $script - VM $Hostname - HostUser $HostUser - HostPassword $HostPassword - GuestUser $GuestUser - GuestPassword $GuestPassword - ScriptType $ScriptType

    Thank you!

    How you code the - VM on the Invoke-VMScript cmdlet parameter, it seems that Displayname of the guest is the same as the host name.

    Can't you just use a loop on guests and then use the displayname property

    $script = "%windir%\system32\cmd.exe /c c:\dr\drIPsettings.bat"
    $HostUser = "root"
    $HostPassword = "password"
    $GuestPassword = "password"
    $ScriptType = "bat"
    
    Get-VM | %{
       $GuestUser = $_.Name + "\Administrator"
       Invoke-VMScript -ScriptText $script -VM $_ -HostUser $HostUser -HostPassword $HostPassword -GuestUser $GuestUser -GuestPassword $GuestPassword -ScriptType $ScriptType
    }
    

    You can encode the Get - VM with more specific selection criteria or use a Where-Object after the Get - VM.

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Spacing problems with the variable in the text captions and smartshapes

    Hello

    I am using Captivate 7.0.1.237 on Windows 7.

    I created a questionnaire that is customized with the last screen showing a message of congratulations and the total score. The total score is variable. The legend appears on the "Edit" mode. But when I publish it as a SWF, spacing stops to the variable.

    Here's what it looks like in edit mode:

    VariableIssue.jpg

    Here's how it looks in the browser (F12 and published modes):

    VariableIssue_Browser.jpg

    I inserted the variable using the accordion Format. What I tried:

    • The simultaneous use of smartshapes and text captions
    • Different browsers (FireFox 24, IE 11, Google Chrome 32)
    • Typed content in Notepad and copy it to the legend smartshape and text.
    • Typed content directly in the legend smartshape and text.

    I get the same result in each scenario.

    Please notify.

    Anthony

    Try to remove the Red extra formatting.

  • How the parameter of the procedure with the default table type?

    Hello!

    How the parameter of the procedure with the default table type?
    For example:
    type varchar2lType is table of varchar2(50) index by binary_integer;
    create or replace procedure test1
       (
        s1  varchar2(50)
        sa2 Varchar2Type
       )
    as
    begin
       dbms_output.put_line('yyxxyyy!');
    end;
    /
    Published by: bullbil on 16.01.2012 06:35

    If he should really be an associative array for some reason any (can't think why, but just for fun...) you could declare a dummy array in the packet header and specify as the default:

    create or replace package wr_test
    as
       type varchar2ltype is table of varchar2(50) index by pls_integer;
       g_dflt_varchar2l_tab varchar2ltype;
    
       procedure testit
          ( p_testarray varchar2ltype default g_dflt_varchar2l_tab );
    end wr_test;
    
    create or replace package body wr_test
    as
       procedure testit
          ( p_testarray varchar2ltype default g_dflt_varchar2l_tab )
       is
       begin
          dbms_output.put_line('p_testarray contains ' || p_testarray.count || ' elements');
       end testit;
    
    end wr_test;
    

    It is a bit of a hack, because it relies on a global variable that is exposed. A more orderly approach would overload the procedure so that a version does not have the table and another argument:

    create or replace package wr_test
    as
       type varchar2ltype is table of varchar2(50) index by pls_integer;
    
       procedure testit;
    
       procedure testit
          ( p_testarray varchar2ltype );
    
    end wr_test;
    
    create or replace package body wr_test
    as
    
       procedure testit
       is
          v_default_array varchar2ltype;
       begin
          testit(v_default_array);
       end testit;
    
       procedure testit
          ( p_testarray varchar2ltype )
       is
       begin
          dbms_output.put_line('p_testarray contains ' || p_testarray.count || ' elements');
       end testit;
    
    end wr_test;
    

Maybe you are looking for

  • Must delete audio video iMovie without Quicktime export

    Hello everyone, I am struggling to find a method to extract only the audio of an iMovie project without using the QuickTime export option because it does not exist for me. I've already split the audio from the video, but I can't seem to be able to sh

  • Change printer name

    MY photo software cannot print on a name of the printer that is longer than 31 characters. No problem with the name of the USB but the name of the wireless printer has "(network)" after which in fact it is too long. How can I change the name of file

  • Acer Aspire E1-572-6477 Fn key does not!

    I use Windows 7. When I first got this laptop the Fn key would work with other keys (for example the brightness), but does not change the volume. The place that I bought someone a fix, I have moved since then. He was worked for about three months now

  • How to change the drive letter with installed applications?

    My window is installed on the C: drive, and the application is installed on the D: drive, I just buy a new HARD drive and put it into drive E:, everything is copied from drive D: to E: drive and want to switch between the letter D: and E:. I tried to

  • What is the number of attempts to "Auto-connect" in MSDS.

    Hello I would like to know, how many times a TMS would attempt a point of termination/MCU while trying to send shout information - before you say 'Allocate failed, the Conference is not automatically connected. The type of conference is auto connect