Open with the cursor

Greetings-

I have a block of code on a report in the grid control, and it works well.
What bothers me is that I need to specify the parameter in the
Open the cursor so many times. I know that there is an easier way.
Here is a simple example of this article:


T1d: = sysdate - 90

my_str: = ' select * from my_table where collection_timestamp
between: 1 and (: 1 + 1)';

my_cursor cursor open for my_str using t1d, t1d.

However - in my code I use this about 24 times. Any help would be appreciated.

Thank you

Brian

Rate the original question when you asked it... However, it is possible to 'normalise' your bind variables in the query using subquery factoring for example

declare
  dt1    date;
  my_str varchar2(32767);
begin
  dt1 := sysdate - 90;
  my_str := 'with t as (select :1 as dt from dual)
             select *
             from my_table, t
             where collection_timestamp between t.dt and (t.dt + 1)';

  open cursor my_cursor for my_str using dt1;
  ..

If you are linking to the weighted subquery just inside, and then this subquery is used throughout the application to provide the values.

Tags: Database

Similar Questions

  • How to open the page with the cursor in a location set

    We have a page for a connection, and I want the page opens with the cursor positioned at this place.  Here's the code we which seems like it should work, but it doesn't.  It's a page someone else created, and as a new user of DreamWeaver, I don't know how it was created to begin with, so don't know how to fix (or start again).  Any advice?  Thank you

    <!--

    int position_cursor()

       {

    document. Login.txtUserName.focus ();

       }

    //-->

    < td height = "47" valign = "bottom" width = "187" > < input type = "text" name = 'txtUserName' / > < table >

    Above all, change it.

    <>

    on this subject.

    <>

    Then, the code that you have demonstrated should work.  However, to change this-

    document.getElementById('txtUserName').focus ();

    and this

    on this subject.

    And it will work.

    (Note: If this does not work, then please post the whole page code in a response.)

  • disable the box around cursor; box moves with the cursor

    suddenly, a transparent box appears around the cursor and moves with him.  Cannot delete the box that moves with the cursor... tried to personalize, mouse pointers, etc.  The default tab has been grayed out, so would not activate.

    Hello

    Looks like you have turned on the magnifying glass.

    Open Control Panel / ease of access Center.

    Click the make the computer easier to see.

    Scroll to the bottom and Remove the check mark from the option turn on Magnifier .

    Let us know the results.

    Concerning

  • Everytime I try to log in its just goes to a black screen with the cursor on my laptop Windows 8.

    * Original title: Admin Login

    On my laptop Windows 8, I can't connect to my admin user or even use my administrative password. Whenever I try to open a session in his will just a black screen with the cursor, and when I try to use my password it dims the screen and I can't do anything. Is there anyway that I can fix this?

    I solved the problem by resetting my laptop using the recovery mode.

  • problem with the CURSOR and WITH clause

    Hi guys,.

    I have never created a package before. I try to run it, but I get:
    ORA-06550: line 8, column 16:
    PLS-00382: expression is of the wrong type
    ORA-06550: line 8, column 3:
    PL/SQL: Statement ignored

    I know that my problem is in the next section

    OPEN FOR V_io_cursor

    with GOT_R_NUM like)


    Is the above correct?

    When I copy paste the "heart" of the query, it works very well. I really have a problem with the CURSOR and the declaration.

    Here's the code in its entirety. I know that the code is much more then he returned, but ignore this overload that was to do some tests to make sure that I can achieve any query request.

    CREATE OR REPLACE
    PKG_SPF_NATIONALREPORTS PACKAGE BODY IS

    PROCEDURE GET_NATIONAL_TOTAL_RESULTS (P_SelectFields IN varchar2, P_SUMFields IN varchar2, io_cursor IN OUT C_RESULTS)
    IS
    v_io_cursor C_RESULTS;

    BEGIN

    OPEN FOR V_io_cursor

    with GOT_R_NUM like)
    SELECT
    -START P_SelectFields
    r.cli_served,
    r.EIER,
    -END P_SelectFields
    r.RC,
    r.Year_ID,
    r.period_id,
    r.agreement_type_ind,
    CONTRACT_NUMBER. CONTRACT_NUMBER_TEXT,
    YEARS.year_desc,
    RC_CODE.rc_code_id,
    RC_CODE.rc_code,
    AHRDA HOLDERS. AHRDA_ID,
    AHRDA HOLDERS. REGION_ID,
    AHRDA HOLDERS. PROVINCE_ID,
    AGREEMENT_TYPE. AGREEMENT_TYPE_ID,
    AGREEMENT_TYPE. AGREEMENT_TYPE_DESC_EN,
    ROW_NUMBER() over (partition R.YEAR_ID, R.CONTRACT_Number_Text
    order by
    P.PERIOD_desc
    (/ / DESC NULLS LAST) AS r_num
    RESULT r
    JOIN period p ON r.period_id = p.period_id
    JOIN CONTRACT_NUMBER ON r.contract_number_text = CONTRACT_NUMBER. CONTRACT_NUMBER_TEXT
    JOIN RC_CODE ON contract_number.rc_code_id = rc_code.rc_code_id
    JOIN AHRDA holders ON ahrda.ahrda_id = rc_code.ahrda_id
    JOIN AGREEMENT_TYPE WE AHRDAS. AGREEMENT_TYPE_ID = AGREEMENT_TYPE. AGREEMENT_TYPE_id
    JOIN the YEARS WE r.year_id = YEARS.year_id
    )
    SELECT year_desc
    -START P_SUMFields
    SUM (cli_served) AS sum_cli_served
    The SUM (eier) AS sum_eier
    -END P_SUMFields
    OF got_r_num
    GROUP BY year_desc
    ORDER BY year_desc
    ;

    io_cursor: = v_io_cursor;

    END GET_NATIONAL_TOTAL_RESULTS;

    Agree - all this talk of loops FOR is completely irrelvant.
    A refcursor is usually the exact mechanism to return a result set.

    What is C_RESULTS?

    Just use SYS_REFCURSOR.

    No need for local variable.

    OUT why? Not just walk OUT?

    PROCEDURE GET_NATIONAL_TOTAL_RESULTS
    (P_SelectFields IN varchar2, P_SUMFields IN varchar2, io_cursor OUT SYS_REFCURSOR)
    IS
    BEGIN
     OPEN io_cursor FOR ...
    END;
    
  • Why Firefox always opens with the last session tabs?

    When I open firefox always opens with the last session tabs? How can I solve this problem?

    You can check if you have a user.js file in the Firefox profile folder that affects the pref browser.sessionstore.resume_session_once true value.

    The user.js file is present than if you or another software has created this file and normally it wouldn't be here.
    You can check its contents with a text editor (right click: 'Open with'; do not double-click).
    The user.js file is read whenever Firefox is started and initializes the preferences to the specified value in this file, so the preferences set via user.js can be changed temporarily for the current session.

    You can remove the user.js file if you do not create this file yourself.

    You can use this button to go to the Firefox profile folder currently in use:

    Windows hides certain default file extensions.
    Among them are .html, .ini and .js, .txt, so you can see only file name without the file extension.
    You can see the type of actual file (file extension) in the properties of the file via the context menu in Windows Explorer.

  • Everytime I open a new firefox window, a new tab opens with the new window. How do I stop this?

    Everytime I open a new Firefox window, the new window opens to the page of hope (as I want him), but then a tab opens with the new window. I want Firefox to stop doing this. When I open a new window I want just the window to open it. I don't know how to solve this problem I've known idea how I did that happen. First of all, it happened when I hit Ctrl + N to open a new window, but I did not hit the "N" itself. I pressed one of the other keys around the "N" and this issue has started.

    It's quite strange!

    Have you tried to reset Firefox? You will find all the information you need to reset, here:

    Firefox - modules to reset and refresh settings

    Let me know if it worked!

    See you soon!

  • Firefox always opens with the tab 'Search', even if I don't want. How can I stop this?

    When I open Firefox, it normally opens to my home page. But it opens with the tab 'Search', although I don't want that. How to prevent this?

    Since the search offered appointment on your homepage page chosen. Now, move the mouse to the upper left corner and the options for displaying, toolbars for analysis and make sure the "menu bar" is checked. This will show the options File, Edit, View, history, bookmarks and tools and help. Click on tools, then Options, and then select the current page as your home page. All should be arranged.

  • How to open a new tab in an existing window so that it automatically opens with the web site to the home page?

    By opening a new web browser window my chosen site associated with my home page opens automatically, but each new tab open then [in this window] is empty. How do you define new tabs opening with the site, just like the initial tab only when you open the browser window?

    You can do this by using an add-on such as:

    Another way to open the home page in a new tab is in the Middle, click the home button in the navigation toolbar.

  • Windows xp black screen with the cursor

    Windows xp black screen with the cursor

    Hello

    You did it changes on the computer before the problem started?
    You are able to start the computer in safe mode?

    If you cannot start the computer in safe mode , and then follow the steps in the article mentioned below.

    Computer stops responding with a black screen when you start Windows XP:
    http://support.Microsoft.com/kb/314503

    Kind regards
    Afzal Taher - Microsoft technical support.
    Visit our
    Microsoft answers Feedback Forum and tell us what you think.

  • How can I make my files open with the section 'files' (on the left) already enabled (in Windows Explorer)?

    I'm on Windows XP with Service Pack 4.  The "show common tasks in folders" checked in folder options and my windows Explorer opens with the "common tasks" bar on the left side.  I have to click on 'files' (in the top tool bar) to get my files to display on the left.  If I click on "use Windows classic folders" instead of "Show common tasks in folders" my explore opens with no left bar at all and I still click on 'files' to have folders appear in the position of the left side bar.  Can I solve this case everytime I open windows Explorer opens on the side bar of folders on the left and content on the right?  If Yes, where and how do the default every time I open windows Explorer?  Thanks for any help, that all the world can offer.

    Thank you very much.  This has not only had what I wanted, but also extend this ability to any file folder I click on.  What I was really doing was: I saved a link to a set of "my computer" window microsoft explore my d: drive (my data partition) so it automatically goes to what I look at in explore more often rather than having open 'my computer' and go through several steps to get to the open D: partition.  But I still had to push the button of "folders" at the top of the page to open the view in the left bar of my directories - every time.  With your help my link now opens windows Explorer set up exactly the way I want every time!  You have saved me from countless steps repetative in the future for every time I open windows Explorer.

    Thank you once again,
    David Myers

  • When I try to open e-mail files a small box opens with the setting or the input string was not good format

    original title: windows live suit

    When I try to open e-mail files a small box opens with the setting or the input string was not good format

    Windows Live Solution Center
    http://windowslivehelp.com/

  • I want to be able to move freely photos on a Windows Word page, but the photos keep snapping it back in place on the margins. Is it an alignment etc. function that I can disable so I can move photos with the cursor?

    I want to be able to move freely photos on a Windows Word page, but the photos keep snapping it back in place on the margins. Is it an alignment etc. function that I can disable so I can move photos with the cursor?

    I want to be able to move freely photos on a Windows Word page, but the photos keep snapping it back in place on the margins. Is it an alignment etc. function that I can disable so I can move photos with the cursor?

    =================================
    Change the text wrapping...

    In Word 2007... I'm going to... Format / dressing / thanks to...

    Then I can use the arrow 4 positions to drag photos anywhere
    I chose.

    If you want to drag the photos on the page...
    I don't know how to do this. John Inzer - MS - MVP - Digital Media Experience - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - to proceed at your own risk

  • changing value of text with the cursor

    Hi you all

    I need a help from your side

    I have created a slider and change the size of the listview text with the cursor

    Here is my code

     Slider {
                           id: slider
                            fromValue: 8.0
                            toValue: 16.0
                            value: 8.0
                            layoutProperties: StackLayoutProperties {
                                spaceQuota: 0.1
                            }
                            preferredWidth: 200.0
                            maxWidth: 250.0
                            preferredHeight: 20.0
                            visible: true
                            enabled: false
                            horizontalAlignment: HorizontalAlignment.Center
                   onImmediateValueChanged: {
    
    // descriptionText is the id of label
              descriptionText.textStyle.fontSize = FontSize.PointValue
               descriptionText.textStyle.fontSizeValue = immediateValue
                            }
    
                        }
    
    /***********************************************************************//
    i am adding data to listview using remote source
    
      Container {
                id: listviewContainer
    
                layout: StackLayout {
    
                }
                ListView {
                    id: myListView1
                    dataModel: dataModel1
                    //{
                    //  source: "asset:///models/xmldata.xml"
                    //      }
    
                    // Use a ListItemComponent to determine which property in the
                    // data model is displayed for each list item
                    listItemComponents: [
                        ListItemComponent {
                            type: "item"
                            Container {
                                rightPadding: 20
                                leftPadding: 20
                                horizontalAlignment: HorizontalAlignment.Center
                                verticalAlignment: VerticalAlignment.Center
                                layout: StackLayout {
                                    orientation: LayoutOrientation.TopToBottom
    
                                }
    
                                Container {
                                    topPadding: 40
    
                                    horizontalAlignment: HorizontalAlignment.Fill
    
                                    layout: DockLayout {
    
                                    }
                                    // The Item content container
                                    Container {
    
                                        verticalAlignment: VerticalAlignment.Top
                                        horizontalAlignment: HorizontalAlignment.Right
                                        layout: StackLayout {
                                            orientation: LayoutOrientation.RightToLeft
    
                                        }
    
                                    }
    
                                }
    
                                // Description text label
                                Label {
                                    id: descriptionText
                                 //
                               //     objectName: descriptionText
                                    //  leftMargin: 20
                                    horizontalAlignment: HorizontalAlignment.Right
                                    verticalAlignment: VerticalAlignment.Top
                                    text : ListItemData.des
                                    textStyle.color: Color.create("#868686")
                                    textStyle.textAlign: TextAlign.Justify
                                    multiline: true
                                    textFormat: TextFormat.Plain
                                    textStyle.fontSizeValue: 8.0
                                }
    
                        }
    
                    }
            ]
    
        }
    
        attachedObjects: [
            GroupDataModel {
                id: dataModel1
    
                // Sort the data in the data model by the "pubDate" field, in
                // descending order, without any automatic grouping
                sortingKeys: [ "date" ] //[ "pubDate" ]
                sortedAscending: false
                grouping: ItemGrouping.None
            },
            DataSource {
                id: dataSource1
                objectName: ""
                // Load the XML data from a remote data source, specifying that the
                // "item" data items should be loaded
                source:"http://10.121.10.139/simplehtmldom/getdescnews.php?newsid="+dataSource1.objectName
    
                query: "/news/property/"
                type: DataSourceType.Xml
    
                onDataLoaded: {
                    // After the data is loaded, clear any existing items in the data
                    // model and populate it with the new data
                    dataModel1.clear();
                    dataModel1.insert(data)
                    myIndicator12321.setRunning(false);
                    myIndicator12321.setVisible(false);
                    //      dataModel.insert(data)
    
                }
    
                    }
        ]
    }
    
    // in the end i am calling on creating complete
    
    onCreationCompleted: {
            // When the top-level Page is created, direct the data source to start
            // loading data
            dataSource1.load();
        }
    

    problem I am facing is, it does not find the descriptionText variable, which is the id of the label

    can someone help?

    OK, the problem is that listItemComponents attached to a control, such as ListView have their own context. ListItemComponent documentation refers to what I think. If you must do the following:

    1. do you have a property that is defined as an attribute of the ListView

    2 bind your fontSizeValue to listItemComponent tag to the ListView. Note, however, to do this, you need to get a reference to the ListView using your label ListItem.view is found in the container. Not obvious, I know.

    3. do you have your cursor to update the property you have defined for the ListView.

    Cursor---> p_font_size ListView property<---------->

    Like this:

    {To ListView
    ID: myListView1
    property real p_font_size: 10

     

    listItemComponents:]
    {ListItemComponent}
    type: 'point '.
    ID: sample

    {Of container
    ID: mainListViewContainer

    {Label
    ID: descriptionText

    ..........
    textStyle.fontSize: FontSize.PointValue
    textStyle.fontSizeValue: mainListViewContainer.ListItem.view.p_font_size

    }

    and elsewhere on your page

    Slider {}
    ID: slider

    fromValue: 8.0
    toValue: 16.0
    value: 8.0
    layoutProperties: {StackLayoutProperties}
    spaceQuota: 0.1
    }
    preferredWidth: 200.0
    maxWidth: 250,0
    preferredHeight: 20.0
    visible: true
    enabled: true
    horizontalAlignment: P

    onImmediateValueChanged: {}
    myListView1.p_font_size = immediateValue
    }
    }

    I test it and it works. Please make this response as the solution if it works for you too :-)

  • MessageConnection opening with the mms protocol prefix, phone number and application ID fails

    Connector class API says docomentation when send MMS to Java application MessageConnection can be opened with the following URL "mms: / / []: []". However when I go for example ' mms: / / + 1234567890:myappID "to Connector.open () IllegalArgumentException is thrown with the invalid message 'URL '. MessageConnection opening with "mms: / / + 1234567890" works very well. It can be reproduced on BB 9105 but BB 9900 is not affected. Is there any workaround for this problem solution I can still be able to send MMS to another Java application?

    Found this prefix "+" is not a reason any.
    http://supportforums.BlackBerry.com/T5/Java-development/cannot-receive-MMS-with-port-USIN-WMA/TD-p/4...

Maybe you are looking for