How to declare a list of dates

Hi,
I have an item which type is "Display as text based on LOV". I put in the source section under the type "Pl/SQL function body" the following pl/sql function :
DECLARE
X VARCHAR2 (4000);
Y DATE ;
BEGIN
X := 'SELECT distinct(TO_CHAR(DATE1, ''YYYY'')) d, (TO_CHAR(DATE1, ''YYYY'')) r FROM SIVOA.EVV_'|| :p4_site ||' WHERE CLEF_VAR = (SELECT CLEF_VAR FROM SIVOA.SITE_DEBIT_RIVIERE WHERE SITE ='''|| :p4_site ||''')
order by d';
EXECUTE IMMEDIATE X INTO Y;
RETURN Y ;
END;The problem is that I get an ORA error.
ORA-00932: types de données incohérents ; attendu : - ; obtenu : -
I know that I have declared Y as a date and that what is returned by my function is a list of dates. I don't know how to declare a list of dates or whatever to be returned as a lis of values. Hope I am clear, sorry for my english.
Thank you for your kind help.
Christian

Hi Tony
You hare very patient with me thank you !!!
Let me clarify well.
I am trying to create a list of values based on dates contained in a table. This list of values should contains the "years". If the table contains data for the years 2005, 2006, 2007, then the list of value should return :
2006
2007
2008
As I want a list of value I need to have a display and a return value. The name of the table is 'dynamic' It is the item P4_SITE that contains a part of the name of the table. This is why I am usins PL/SQL, because I don't know the name of the table in advance.
I have not seen any way to put a pl/sql statement in the List of values definition of the item. Thi s is why I try to make a LOV with the SOURCE of the item.
Hope I am clear.

Similar Messages

  • How to filter the list of data

    I am using af:inputComboboxListOfValues to display drop down list of data. The list is binded to a LOV.
    I have a requirement that if the value is used in other place, I should not get it listed on the drop down list. I research doc that it let me use "launchPopupListener" to filter the list of data. As a test code, I coded like this:
    public void launchListener(LaunchPopupEvent launchPopupEvent) {
    // Add event code here...
    DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("PersonVO1Iterator");
    dcItteratorBindings.getViewObject().setWhereClause("PersonEO.FIRST_NAME <> 'John'");
    dcItteratorBindings.getViewObject().executeQuery();
    But it does not work. It seems that 'John' is removed from VO but doesn't removed from UI combo box drop down list.
    What can I do to fix it?
    JDev Version 11.1.1.6.0
    Thanks.
    帖子经 954727编辑过

    Morris Li,
    Welcome to the ADF Forum. Have you looked into whether the PartialTriggers for the ui combo box have been set.
    This article may also assist: "Building model driven dependent list with Oracle ADF BC"
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/march2011-otn-harvest-351896.pdf
    and this http://docs.oracle.com/cd/E16764_01/web.1111/b31973/af_ppr.htm#BGBIIDBF
    Stuart

  • How to get the list of data providers used in a web template?

    I want to find a quick way to retrieve the list of data providers defined in the <object> tag in the Web template. One awkward approach is to parse the entire HTML page for <object> then filter out "DATA_PROVIDER: xxx".
    But is there any method or function call to retrieve the list quickly?
    Thanks!

    Try the function below, pass the item name and get the Data provider for that particular item, you will have to do this for all the items in the template.
    function getDPName(item){
         prop = SAPBWGetItemProp(item);
         var tableHidden=true;
         if (prop != null){
           for(i=1;i<prop.length;i++){
             if (prop<i>[0] == "DATA_PROVIDER")
                   return prop<i>[1]
           }//end for
         }//end if
    }//end function
    Thanks.

  • How to get a list of dates given a range

    Hi,
    I need to get the list of the dates from today. i.e, the list of last 30 days from today. What is the query to fetch the list of date values? I know to get the current date using sysdate function in oracle, but to fetch the list of 30 days from current date like20-07-2011,19-07-2011,18-07-2011,17-0702011......
    Please help me to get the list of dates..
    Regards,
    Pradeep
    Edited by: 873670 on Jul 20, 2011 4:03 AM

    One way to do it....
    SELECT
        SYSDATE - (ROWNUM - 1)
    FROM
        dual
    CONNECT BY
        level <= 30

  • How to declare a bind variable with 'date' data type in command prompt?

    how to declare a bind variable with 'date' data type in command prompt?
    sql>variable q date;
    when i execute it show list of datatypes

    Hi,
    As Lokanath said, there are no DATE bind variables.
    You can use a VARCHAR2 bind variable, and convert it to a DATE in your SQL statment.
    If you're using SQL*Plus, consider a substitution variable. It won't be as efficient as a bind variable, but it will be as convenient.
    For example:
    DEFINE  first_entrry_date = "DATE '2010-06-20''
    SELECT   ...
    WHERE   entry_date >= &first_entry_date
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • HR abap :  how to declare internal table to fetch data from 0585 infotype

    Hi all ,
    I am able to fetch the data from pa0585 infotype for set of employee no , but the problem is as the fields in pa0585 (like Contr to ULIP , NSC , Medical Treatment,Contribution to Certain Pension Funds so on ..) will be changed dynamically and will be displayed based on the amount value in descending order iam not able to store the values of the fileds into internal table . I dont understand how to declare the internal table ..Please help in if u have solved this kind of problem.
    I shld get the output in this way ...
    Emp No     Name    Medical treatment       Contr to ULIP             ....... so on
    101          abc           10000                        150000                      .......so on
    102          xyz           12000                        150000                      .......so on
    My header shld be fixed and I shld display values in this way .... I can use write statement to display directly .
    Thanks ....

    Hi
    Decalre INFOTYPE
    Goto SE37 - Find FM -
    READINFOTYPE*

  • Hi,This morning I wanted to call, so I took my phone ( Iphone 4 S) ,but my All contacts list was empty! I checked in my computer ( windows 8) I have them in Iclould. How can I bring back my data?

    Hi,This morning I wanted to call, so I took my phone ( Iphone 4 S) ,but my All contacts list was empty! I checked in my computer ( windows 8) I have them in Iclould. How can I bring back my data?

    Hello Noushin,
    It sounds like you are unable to see your contacts in the phone, but have confirmed they are still at http://www.icloud.com. I would next try these troubleshooting steps from the article named:
    iCloud: Troubleshooting iCloud Contacts
    http://support.apple.com/kb/ts3998
    If you're using iOS 7, quit and restart the Contacts app on your iOS device:
    Press the Home button twice to see preview screens of the apps you have open.
    Find the Contacts preview screen and swipe it up and out of preview to quit the application.
    Tap the Home button to return to your Home screen.
    Wait a minute before reopening the Contacts app.
    Turn iCloud Contacts off and back on:
    Tap Settings > iCloud.
    Turn Contacts off. Choose to delete data only if your data exists at icloud.com/contacts and on one or more of your devices. Otherwise, choose Keep Data.
    Wait a few minutes before turning Contacts back on.
    Restart your iOS device by holding down the Sleep/Wake button and then swiping the screen when prompted to power off. Then turn your device back on. This may sound simple, but it does reinitialize your network and application settings and can frequently resolve issues.
    Thank you for using Apple Support Communities.
    Regards,
    Sterling

  • How do I clear updated apps listed by date in the Updates section of the App Store app?

    How do I clear updated apps listed by date in the Updates section of the App Store app?

    Hi rowiny,
    depending on what exactly you mean with "clear", it is a bug. See this thread: App Store Updates Do Not Clear
    If you update your App's via iTunes, and not "over the air", the badge count on the AppStore-app icon is wrong, and the list shows "available updates" that you can open in the new version. The listing under "Updated #date#" lists only updates that were done OTA in the last month.

  • From SharePoint2013 list item data how to create Google Interactive Chart?

    HI All,
    From SharePoint2013 list item data how to create Google Interactive Chart?
    Thanks in advance!

    Hi,
    To push data from list items to Google Chart, we can use JavaScript Client Object Model or REST API to retrieve the data needed.
    Here are two links about using JavaScript Client Object Model to access list items:
    http://msdn.microsoft.com/en-us/library/office/hh185006(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
    From the links from the official site of the Google Chart, we can find out the method to populate data into Chart:
    https://developers.google.com/chart/interactive/docs/quick_start
    https://developers.google.com/chart/interactive/docs/examples#gauge_example
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to make a list item field with DATE data type?

    I have a column with DATE data type. Using forms 6i I want to generate a poplist list item field with this column while the value of the elements in the list to will be day names like SATURDAY,SUNDAY,MONDAY. if we change the data type from date to char, it will work properly but now with DATE data type behind it, it gives the following error message
    "FRM-32082: Invalid value for given item type.
    List WEEKREST
    Item: WEEKREST
    Block: EMPRESTS
    Form: MODULE3
    FRM-30085: Unable to adjust form for output."
    Using forms 6i how to make a list item field with DATE data type which can hold day names?

    Set your date column as a hidden (non-displayed) field. Create your list item with the varchar2 day names. Create the list item as a non-base-table field that accepts the text values of day names. On that field, create a when-validate-item trigger that translates the text into a real date, which it then uses to set the value of the actual base-table item.

  • I wish to list consectutive dates in a column.  How do I do this without having to enter each date in each cell?

    I wish to list consectutive dates in a column.  How do I do this without having to enter each date in each cell?

    Hi pdh,
    Enter the first date. I typed 23 feb. Numbers adds the year (if you want a different year, type that as well).
    Press return (enter)
    Click on the first cell.
    You will see a small white crcle at the bottom right of that cell.
    Drag the circle down.
    Regards,
    Ian.

  • How a varaible on date at runtime can bring the list of dates vs.calendar

    Hi All,
    How a varaible on date at runtime can bring the list of dates that already exists the data for vs.calendar?
    Thanks
    - Shashi

    Hi Santosh,
    Now the BI 7.0 has the filter setting as 'Only posted values in InfoProvider' at the infoobject maintenance screen under BEx tab, and that solved the issue.
    Thanks,
    - Shashi

  • How to generate a list of  pick dates for all scheduled deliveries?

    Hi!
      How to generate a list of  pick dates for all scheduled deliveries?
      What all the tables involved?
    Thanks
    Imran.

    Thanks for the suggestion concerning the file path.  And certainly it would have been nice to have done this before beginning.  However this is a project that has been around for quite a while, and the files have been moved into different bins.  And now the project sequence is being revised.
    So the problem is, worded slightly differently, how can I search all of the bins for the files that are used just by this sequence, ignoring the files which are used by other sequences?  Or, how can I get a list of the file paths of the files that are used in the sequence?

  • Podcasts for iPad4: the list of titles is shown with 'monday' or 'tuesday' instead of the date after installing podcasts 2.1. How can I switch to the date?.

    Podcasts for iPad4: the list of titles is shown with 'monday' or 'tuesday' instead of the date after installing podcasts 2.1. How can I switch to the date?.

    You can't switch that display format.

  • How to declare value binding to array list element in a pojo?

    I have a POJO called P, that contains an ArrayList member called w.
    class P {
    private ArrayList w = new ArrayList(5);
    w is initied in the class constructor.
    The POJO is in the SessionBean and I would like to reference individual
    elements in the ArrayList via a value binding like so;
    #{SessionBean1.instanceOfP.w[5]}
    I'm not sure how to declare the getter/setter for member W in POJO P
    so that setter and getter injection work.

    You may not be able to directly set the indexed value.
    Try some thing like this.
    Add a property that returns the indexed value.
    Ex. if you ArrayList objets are of type "String"
    int index = 5;
    public String getMyValue(){
    return w.get[index]
    Now your value binding would look something like
    #{SessionBean1.myValue}
    BTW, if you want to access different index, create another method
    public void setIndex(int index){
    this.index = index;
    - Winston
    http://blogs.sun.com/roller/page/winston?catname=Creator

Maybe you are looking for