Automate script to display result

Hi everyone,
I'm beginner at PL/SQL. I want to automate this request so it will be lunched every day at 12:00(AM) and I can display the result
select col1 from table_A where col_date >='sysdate -1 12:00:00';
thank you,
Regards
Edited by: 961285 on 25 sept. 2012 07:10

>
The select could be like this:
select col1 from table_A  where  col_date >= trunc(sysdate) - 1 + 12/24;As for running it each day, you can create a windows scheduled job, that opens up your sql plus window each day. Provide the user credentials and a script to run. The script would hold this previously mentioned select statement
Remember: automatically seeing this result each day looks like a client task.

Similar Messages

  • Script looping display result

    Hey just a simple question about loops in script editor:
              Below I have the Fibonacci sequence:
    set fibs to {}
    set x to (text returned of (display dialog "What fibbonaci number do you want?" default answer "3"))
    set x to x as integer
    repeat with y from 1 to x
                   if (y = 1 or y = 2) then
                                  copy 1 to the end of fibs
                    else
                                   copy ((item (y - 1) of fibs) + (item (y - 2) of fibs)) to the end of fibs
                    end if
    end repeat
    return item x of fibs
    Just wondering how to display iteration 1,1,2,3,5,8,.....etc  and not just the final result. Thanks.

    Fibs is a list of numbers, {1, 1, 2} for example. If you try to print that Applescript will complain because it can't print out lists, only strings. So you need a string representation of the list. You need to take each element of the list and add that to a string.
    It would be possible to do this by iterating over the list item by item and converting each item to text and adding it to a string variable. (A good exercise for the reader) but Applescript gives us an easier way.
    In Applescript is a property, Applescript's text item delimiters, which tells Applescript how to split a string up or combine a list into a string.
    In the case of splitting Applescript will split a string at each text item delimiter character. So if you  had a string "555-1111-2222" and set Applescript's text item delimiters to "-" then that string would be broken at each dash and you would get three items from it, the three parts of the phone number.
    In the case of combining the text item delimiter is placed between each item of the list when it is converted into a string. In your case you wanted a comma between each number so I set the text item delimiter to ",".
    The
    set {oldtid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ","}
    is just a way of setting multiple variables in one shot. Each item from the first list is set to the corresponding item of the second list. So we save the current
    text item delimiter in oldtid an set it to the comma. Then when we are done with it we set it back to what it was, a good habit to get into.
    Hope this helps
    regards

  • Applescript Studio Beginner - Run a script and display a window

    Hi,
    I am new to applescript studio ; I found out how to make an application displaying a window with a progress bar.
    How can I start running a script without displaying any window, and at some time in the script, run the "awake from nib" handler that will call the display of the progress bar ?
    Thanks,
    Nicolas

    Nicolas Silvestre wrote:
    How can I start running a script without displaying any window, and at some time in the script, run the "awake from nib" handler that will call the display of the progress bar ?
    The "awake from nib" handler is called automatically when your nib file gets loaded, you don't call it yourself. I suppose you could go thru the pain of putting your window into a separate nib file and then have your script load the nib file when you're ready... but that's not the easiest way to do it and you probably don't need to do this for your situation.
    All you really need to do is go into Interface Builder, select your window object and uncheck the checkbox in the "Window Attributes" pane that says "Visible At Launch". The "awake from nib" will still be called at it's normal time and your window will be loaded but it will not be displayed.
    Then you can do whatever other scripting you need to do... and when you're ready to display your window you simply call:
    show window "yourWindowsAppleScriptName"
    You can do your initial scripting at the beginning of "awake from nib" and then call "show window" at the tail end of "awake from nib" if that works for you. But you don't have to have the "show window" call in your "awake from nib"... you can call it later on in some other handler if you need to.
    Steve

  • How to prevent a text in script from displaying if its value is zero

    Dear all,
    How to prevent a text in script from displaying if its value is zero
    for eg   Price  = 0.00
    if price is 0 it should'nt appear in output.
    I tried with    if price ne 0.
                       price = &price&
                        endif.
    but it's not working.
    Regards
    Raj
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Jan 20, 2009 8:59 AM

    Hello Nagaraju,
                           What you were doing is partially right.
    The correct format to write in the script is as follows :
    /:  if &PRICE& ne 0.
      &PRICE&
    /:  endif.
    This should work. Let me know how it goes.
    Nayan

  • How to configure search results web part to display results only after a query is generated from user?

    Hi All,
    I am crawling documents from a file server. I created a new content source and crawled the documents. All documents are crawled successfully.
    Then I went to my enterprise search center site collection and created a new result source. I have added the query to use above content source.
    After that, on a page I am trying to configure the search results web part to display documents using this result source. Now the problem is:
    It displays all the documents that are crawled without searching for anything. I mean first it should not display any results. If a user searches for something , then according to that search it should display results.
    Any idea how to do this in the web part? I am using SharePoint 2013 on premise enterprise edition. No code. Totally OOTB.

    Hi Mohan,
    What did you use for the Query text in the result source?
    I could reproduce this issue when I used Query text like: {searchTerms} Path:”http://sps2k13sp/sites/First/Shared%20Documents”
    Then I changed the Query to
    {?{searchTerms}
    Path:"http://sps2k13sp/sites/First/Shared%20Documents"}
    , then Search result web part didn’t return results without searching.
    So , check your result source, and use the Query like the above(adding "{?...}").
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Unable to display results of multiple query in grid in Oracle SQL Developer

    Hi, I am a newbie to this forum and couldn't find the Oracle SQL Developer forum so posting it here.
    My question: How to display multiple query results in grid in Oracle SQL Developer.
    Example:
    select * from Employee;
    select * from Department;
    - when I select both the queries and hit F5 in Oracle sql developer. By default it displays in output window.
    - How to display result of both the queries in Grid.
    Any thoughts on this would be really helpful.
    Thanks in advance.
    Harsh

    Hi Harsh,
    I'd say that the Results grid is designed to only show the results of 1 query at a time. I don't know/can't see how it would display multiple queries at a time.
    I would suggest either joining your tables to create a single query or opening another SQL Worksheet for one of the queries so that you can display the results side-by-side.
    Maybe you could explain what you're trying to do. Why are you trying to display multiple results in the same query grid?

  • Display results of MySQL query from AMFPHP by ArrayCollection in AS3 (Flash CS4)

    Hi, i am using Flash CS4 (AS3) + AMFPHP + MySQL to do own flash frontend for Wordpress CMS.  Everything is going fine but i`ve got one problem. Problem with properly display of result of query in AS3 by using ArrayCollection.
    When i check my service in "amfphp/browser/" in web browser i`ve got this (with all needed data):
    (mx.collections::ArrayCollection)#0
    filterFunction = (null)
    length = 2
    list = (mx.collections::ArrayList)#1  
    length = 2     source = (Array)#2
    That is the reason that i suppose that service work fine.  Problem is when i try to display result in AS3. In actionscript i have got this:
    function getNewsListHandler(result:Object):void{
    trace(result);
    This function displays: [object Object].
    I know that "result" is an ArrayCollection type but i don`t know how to get rows and columns from this. I know that my data is there but i have no idea how to get it.
    Clarify: I don`t know how to get to Arrays and simple data variables which are in ArrayCollection.
    Could anyone help me with that problem. I would be gratefull
    P.S. I tried also change query type in service.PHP for mysql_fetch_query but in that case i`ve got only one row (not all data).

    Thanks for fast reply,
    arr_coll:ArrayCollection = new ArrayCollection ({col1:"data1",col2:"data2"}, {col1:"data3",col2:"data4"});
    you would get the data like
    var resultstr:String = arr_coll[1][1].col2;
    trace(resultstr);
    //results in data4
    could you explain me how it was happen (arr_coll[1][1].col2)? It`s not clear to me. I thought in this case rather something like this :
    var resultstr:String = arr_coll[1]['col2'];
    It should give me "data4". I know it wasn`t but i don`t understand ArrayCollection in level which is needed to use your advice in my case. Could you clarify "arr_coll[1][1].col2" a bit?
    What would it look like when you would have something like this:
    arr_coll:ArrayCollection = new ArrayCollection ({col1:"data1",col2:"data2"}, {col1:"data3",col2:"data4"},{col1:"data5",col2:"data6"},{col1:"data7",col2:"data8"});
    and you would want know f.e. position in ArrayCollection of  "data6". How would you code this? arr_coll[1][2].col2?

  • How to simply display resulting text in a dialog Box

    Is there a way to simply display resulting text in a dialog Box - not a text edit document?
    Doug_

    Thanks that's very helpful
    What I am trying to to is to create a workflow that opens mail and displays iCal TO DO's that I have created throughout the day tagged with the word MAIL so they can be filtered.
    At the moment the ACTIONS are:
    Launch Mail
    Get New Mail
    Find TO DOs in iCal (Who's SUMMERY includes MAIL)
    I get iCal To Do's as a result
    But then...I can find no options to display the iCal Events that result.
    Putting in the Applescript you posted displays a blank dialog box. This tells me that there is no text in the result.
    Yet if I put a SPEAK TEXT in after find TO DOs it dutifully speaks my filtered TO DO's
    I thought I might just try a NEW MAIL MESSAGE action.
    This works great in the workflow. The content of the new mail is the filtered TO DOs.
    But if I save it as an application (the form I need it in), mail simply opens blank when it reached that part of the work flow.
    What would you recommend?
    Thank again for your help,
    Doug_
    Message was edited by: Douglas Suiter
    Message was edited by: Douglas Suiter
    Message was edited by: Douglas Suiter

  • Display result in browser

    I need to write a java client that sends a query to server and display result in browser. I intend to call from the client the command 'cmd.exe /c start url' which will send a http request and bring up a browser for the result. But somehow if the url has more than one query argument, for example -- "http://hostname/test?node1=abc&node2=123", only everything before the "&" is taken, i.e. "http://hostname/test?node1=abc".
    Another approach would be to do it step by step, send a regular http request, either the server or the client save the result to a file, then call 'cmd.exe /c start file_location'.
    Does anyone have any better idea to work this out or why 'start url' wouldn't work? thanks.

    The command interpreter (cmd.exe) is interpreting the "&" and thus, is dropping everything after it.
    e.g. Try this from a DOS prompt:
    cls&echo hey
    You get a clear screen, with "hey" at the top, and then the prompt.
    Similarly, try this:
    cmd.exe rem hello&echo goodbye
    You get a new command prompt. Fine. Now exit that, and you get "goodbye" on the screen because that command was still queued up.
    Maybe try using the hex equivalent for the "&" character?
    Hope that sheds a little light - good luck!
    Regards,
    Nate

  • Crystal Report Takes very long time to display results

    Dear All,
    I am new to Crystal reports. We have installed Crystal report developer 2008 SP3 on Windows7 Service pack 1. We are creating reports from SAP ECC 6 EHP 4 Ready in Crystal Reports. The problem we are facing is that every report which we have developed in Crtystal reports is taking around 1 to 2 hours to display results. the reports are pertaining to only one day or one month data. we have also switch off "Verify On First Refresh", "Verify Stored Procedures On First Refresh", "Verify Database" and  we are also not saving data on report level as per the threads which are already posted in the forum pertaining to our problem.
    You are requested to kindly guide me how I can improve the performance of our crystal reports.
    Regards,
    Danish.

    You select expert formula says enough. It would appear that little or no data filtering is being carried out on the database server. Thus all records will be returned to Crystal and then filtered locally.
    You need to try and incorporate the logic of formula  {@Form_PeriodCvn} into the select expert. Or build a view/stored procedure which returns a value compatible with your filtering requirements.
    What is contents of formula  {@Form_PeriodCvn}
    Ian

  • How to display result of database query in JFrame?

    How to display result of oracle database query in JFrame?
    This is part of my code:
    String username, password;
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              OracleConnection conn = DriverManager.getConnection(String url, String username, String password);
    Statement s= conn.createStatement();
    ResultSet q= s.executeQuery("SELECT A, B, C FROM TABLE X");
    Forget what url, username & password are. Is there any problem with my code?
    What should be next if I want to display result of the query in a table in JFrame?Thx !

    How to create JTable with unknown no. of rows? How to get no. of rows of a query?
    I saw the demo of creating JTable on java.sun.com but the the table has a certain no. of rows which is not applicable to my case.
    Suppose the result of query is a table with 3 attributes so there are 3 columns in the table.
    R contains the result of the query.
    Should it be something like this if I want to create JTable of the query?
    How to make n rows of {R.getString(1),R.getString(2),R.getString(3)};?
    public SimpleTableDemo() {
    super(new GridLayout(1,0));
    String[] columnNames = {"A",
    "B",
    "C",
    while (R.next())
    // content of a row
    Object[][] data = {R.getString(1),R.getString(2),R.getString(3)};
    I can't run it because I still can't debug my code which is said before.
    Thx!

  • Display results as String: dosen't work based on the example

    Hello,
    To understand how to display results as string, I tried to reproduce this:
    [http://apex.oracle.com/pls/otn/f?p=31517:84|http://apex.oracle.com/pls/otn/f?p=31517:84]
    I have my table emp
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7839  KING PRESIDENT -  81-11-17 5000 -  10
    7698 BLAKE MANAGER 7839 81-05-01 2850 -  30
    7782 CLARK MANAGER 7839 81-06-09 2450 -  10
    7566 JONES MANAGER 7839 81-04-02 2975 -  20
    7788 SCOTT ANALYST 7566 82-12-09 3000 -  20
    7902 FORD ANALYST 7566 81-12-03 3000 -  20
    7369 SMITH CLERK 7902 80-12-17 800 -  20
    7499 ALLEN SALESMAN 7698 81-02-20 1600 300 30
    7521 WARD SALESMAN 7698 81-02-22 1250 500 30
    7654 MARTIN SALESMAN 7698 81-09-28 1250 1400 30
    7844 TURNER SALESMAN 7698 81-09-08 1500 0 30
    7876 ADAMS CLERK 7788 83-01-12 1100 -  20
    7900 JAMES CLERK 7698 81-12-03 950 -  30
    7934 MILLER CLERK 7782 82-01-23 1300 -  10 I created with the wizard, on my page, a new REPORT REGION
    - selected SQL RESULT -
    - Name: Test
    - Region Source Type: SQL Query
    - Region Template: Report Region
    IN Enter SQL Query or PL/SQL function returning a SQL Query, I COPY-PASTE the following code from [http://apex.oracle.com/pls/otn/f?p=31517:84|http://apex.oracle.com/pls/otn/f?p=31517:84]
    DECLARE
       p_vc_arr2   htmldb_application_global.vc_arr2;
       p_string    VARCHAR2 (2000);
    BEGIN
       SELECT ename
       BULK COLLECT INTO p_vc_arr2
         FROM emp
        WHERE deptno = :p84_select_deptno;
       p_string :=
         HTMLDB_UTIL.table_to_string (p_vc_arr2, ':');
       HTP.p (p_string);
    END;AND I have this error:
    +1 error has occurred+
    Invalid query, no select statement found
    Is not a PL/SQP functiion??
    What do I do wrong?
    thanks,
    Roseline Paquin
    Montreal, Canada

    1 error has occurred
    Invalid query, no select statement foundWhat if you try
    DECLARE
       p_vc_arr2   htmldb_application_global.vc_arr2;
       p_string    VARCHAR2 (2000);
    BEGIN
       SELECT ename
       BULK COLLECT INTO p_vc_arr2
         FROM emp
        WHERE deptno = :p84_select_deptno;
        return 'select ''' ||  HTMLDB_UTIL.table_to_string (p_vc_arr2, ':') || ''' str from dual';
    END;??

  • FM K_LINE_ITEM_ACT_DATA_GET doesn not display result

    HI Guys,
    FM K_LINE_ITEM_ACT_DATA_GET doesn't display result for one of my user. Instead of having to debug standard function , have anybody experienced this before and can tell if user might miss authorization ?  please advice ...

    ee

  • Display result Group wise

    Hello experts,
    Update type is key in report.
    It has two values. 1000 & 2000.
    I want to display result after displaying all the values of 1000.
    same for 2000 values.
    Ex:
    1000    ICICI     100
               HDFC   200
               SBI      300
    Result             600
    2000    ICICI     150
               HDFC   250
               SBI      350
    Result             750
    Thank You.
    KV

    Hi KV,
      keep update type and necessary other fields in rows ...
    and values in columns ....
    as the update type is outer most field u need to keep display on the next field in the rows ....
    if u keep display of result for outer most one then it will show after the last value...
    u need to keep resuls row display off for update type and keep result row display for the next field in rows... then u can get the indivudal update type result displays...as u showed...
    Regards
    vamsi

  • Has anyone got a script for displaying a message when attribute combo = 0 stock on hand

        Looking for a script to display the wording back order when stock = 0.
    I am currently using {tag_instock, true, Please choose your customisation,Back Order}
    but that onle displays back order when product disable
    dont want to disbale product

    http://www.acrobatusers.com/tutorials/2007/js_document_scripts/ Entering Document Scripts by Thom Parker
    http://www.adobe.com/devnet/acrobat/javascript.html JavaScript for Acrobat
    You can enter:
    this.getField("todaysDate").value = util.printd("mdyyyyHHMM", new Date());
    or
    function Initialize() { // define action
    this.getField("todaysDate").value = util.printd("mdyyyyHHMM", new Date());
    return true;
    } // end Initialize function
    Initialize(); // call action

Maybe you are looking for

  • Syncing multiple iPhones/iPads/iPods for different users via WiFi on a single computer?

    So my wife and I each have an iPhone running iOS 7.0.3 (11B511), she has an iPad (iOS 7, but unsure of the exact release), and my son has an iPod (also iOS 7, but unsure of the exact release).  I've also have a Mac mini running Mac OS X 10.9 (13A603)

  • How to upload and download files and images using ibm db2?

    For my project i need to upload tutorials in pdf files and doc files to db2 and need to display them in jsp page.and also i need to insert images into db2.Please help me if u kno any of these. Thanks in advance.

  • HT204379 Why we can't use iPhoto pictures on screen saver anymore?

    After years of using our personal pictures from iPhoto for our screen saver, our Mac won't let us choose iPhoto Library as our source for the screen saver anymore. Does anyone know why this happened?  When I choose a folder, the iPhoto Library is dim

  • JTextPane and Clipboard

    Hi! I am using JDK 1.3 and JDK 1.4 and I've got the following question: If I use the javax.swing.JTextPane object, I can define a javax.swing.text.DefaultEditorKit and other actions in order to implement copy/paste functionality. My question is: Whic

  • Mavericks, only one site show question mark instead of images

    Hi,      Updated to Mavericks, only one site show question mark instead of images. Tried safari, chrome and firefox all of them have same problem of showing images of this site. Tried reset, empty cachs, cookies, did not work. Any one have a clue to