Date for passage to the function

Hello

I have this function

create or replace function F_Report_Test (startDate date, EndDate in Date) return varchar2 is

strvar varchar2 (100);
Start

strvar: = ' SELECT * from All_Tables WHERE trunc (LAST_ANALYZED) between ' | StartDate | ' AND ' | EndDate;

return (strvar);

end F_Report_Test;

When I call using Toad/PL/SQL developer, it works very well to help

Begin
dbms_output.put_line (F_Report_Test (20 July 2010 ", July 22, 2010"));
END;

When I put the following in the Source region of a report, then I get an error invalid date. I tried several different formats to make it work without success.

Begin
Return F_Report_Test (July 20, 2010 ", July 22, 2010");
END;


could someone be so kind to advise how I should call function for this contract works in APEX?

Thank you very much
David

the generated query needs quotes around the dates it to all the less so should be:

create or replace function F_Report_Test (startDate date, EndDate in Date) return varchar2 is

strvar varchar2 (100);
Start

strvar: = ' SELECT * from All_Tables WHERE trunc (LAST_ANALYZED) between "' | StartDate | " ' ET ''' || EndDate | " ' ;

return (strvar);

end;
/

the implicit conversion of date isn't the problem here, even if its not advisable to rely.

Edited by: 7 Sep 2010 Barsema 04:42 missing some end quotes

Tags: Database

Similar Questions

  • Is there a limit for research on the function of advanced search for files containing text matching. My search always ends with 500 discoveries but the folder contains several PDF files that match the criteria.

    Hello

    Is there a limit for research on the function of advanced search for files containing a text match? My search always ends with 500 discoveries but the folder contains several PDF files that match the criteria.

    Hi carls76936091,

    Open Acrobat, go to the Edit-> Preferences-> search & check if there is a limit to 500 set, in case if it is to increase it please.

    Kind regards
    Nicos

  • Dates of passage at the cfc?

    I'm just starting to write CFCS and I'm a little puzzled by why my dates do not work if I pass it through an argument, but they work fine if I put the date directly as a variable (todayDate).

    The date is at the top of the page < cfset todayDate = CreateODBCDate (now ()) >. The intention is to use a form to send the dates, but it didn't work so I'm simplifying with a default date to try to find the problem.

    It works:

    < cffunction name = returntype "getTimeReport" = "query" >
    < cfargument "UserRole' default = name ="2"required ="no">
    < cfargument = "UserID" default name = '#session. "Username #" required = "Yes" type = "string" >
    < cfargument = 'StartDate' default = name "" #todayDate # "required ="Yes"type ="date">"
    < cfargument = "EndDate" default = name "" #todayDate # "required ="Yes"type ="date">"
    < default = 'GroupBy' cfargument name = "activityID" required = "no" >
    < datasource = "" #application.ds # cfquery "name ="getSumTime">"
    SELECT #Arguments.GroupBy #, SUM (time) AS TotalTime
    OF mydb
    WHERE userID = ' #Arguments.UserID # '.
    AND entrydate > = #todayDate # AND entrydate < = #todayDate #.
    GROUP OF #Arguments.GroupBy #.
    < / cfquery >
    < cfreturn getSumTime >
    < / cffunction >

    It's not:

    < cffunction name = returntype "getTimeReport" = "query" >
    < cfargument "UserRole' default = name ="2"required ="no">
    < cfargument = "UserID" default name = '#session. "Username #" required = "Yes" type = "string" >
    < cfargument = 'StartDate' default = name "" #todayDate # "required ="Yes"type ="date">"
    < cfargument = "EndDate" default = name "" #todayDate # "required ="Yes"type ="date">"
    < default = 'GroupBy' cfargument name = "activityID" required = "no" >
    < datasource = "" #application.ds # cfquery "name ="getSumTime">"
    SELECT #Arguments.GroupBy #, SUM (time) AS TotalTime
    OF mydb
    WHERE userID = ' #Arguments.UserID # '.
    AND entrydate > = #Arguments.StartDate # AND entrydate < = #Arguments.EndDate #.
    GROUP OF #Arguments.GroupBy #.
    < / cfquery >
    < cfreturn getSumTime >
    < / cffunction >

    Any ideas? I'm bad enough to spot obvious errors, so I'd appreciate pointers. I tried different date formats, but I don't think that's the problem, I can't seem to pass through the arguments. The other arguments go through ok.

    Neve

    It's probably a good thing noted that a form element is never going to produce a date-time object, regardless of how slick DHTML controls is to let the user select it a date.  Once the date is passed via the HTTP request, all it will ever be at the other end is a date and time string.

    It is your responsibility to take this string of date and time and to become an object of date and time.  ColdFusion provides several functions to enable this.  createDate() parseDate(), createODBCdate(), createODBCtime(), createODBCdatetime(), etc.  As well as the very popular that will convert a string date and time in a date-time object and protect those database to SQL injection.

  • Functions are for most of the functions not

    I have an imac os x.  First my menu bar disappears never to return.  And now a lot of functions have simply stopped working.  Cannot cut and paste - or drag and drop - and so on.  This computer is ready for the junk heap?

    It looks like a software problem.

    If you start in safe mode, must always behave in this way?

    http://support.Apple.com/kb/ht1564>

    If it blows away, chances are that you have 3rd party software that interferes with the normal operation of your Mac.

    Safe mode is just an experiment, because it also uses more cautious drivers and is not the way you want to run your Mac normally.  But it's great to understand some 3rd party software is causing problems or causing a Mac to panic.

    Please post the EtreCheck output, so that we can see 3 additions to part, you have installed.

    https://discussions.Apple.com/docs/doc-6174>

    Of course if you are looking for an excuse to buy a new Mac, so do not let the forum in the way

  • Help for problems with the functionality of Capture from Adobe

    Hello

    I recently installed Adobe Capture on my Smartphone (Android device) and the app is very cool.  However, after a few weeks of use, the software stops working.  I uninstalled the software and reinstalled to see if that would help solve the problem.  Unfortunately, it has not solved the problem.  Adobe does not provide an over-the-phone technical support for this product, so I hope someone here can help.

    Recreation of question:

    When you start the application, there are four 4 functions:

    1. Colors
    2. Forms
    3. Brushes
    4. Looks like

    In the lower right corner of the screen, we see a sign '+', which, depending on which function you select, invite the user to 1) select from the cloud or 3) take a new photo 2) select a picture in the camera.  When you select an option, Adobe Capture executes the designated function and the State final changes / outputs on the picture are visible.

    However, when you try to accept or to save changes / outputs, the screen seems to hang up and return to the initial splash screen.

    Can provide you any assistance?

    Thank you!

    Jerry

    Hi Jerry,

    I'm really sorry that capture does not work as it should. This is a known issue in the app and the team is working on a beta version with a fix. I hope that it will be available before the end of the week, but I'm not totally sure of the timeline.

    I know we'll get it on Adobe Android Apps - community - Google +, then join this page and you will be informed as soon as it is available.

    A couple of other things:

    It's an incredible description of the problem you are experiencing. Thank you very much for going into details so. It makes a huge difference when engineers are trying to understand what is happening.

    If please post here or contact us through the app (tap on the draw icon, then give us Feedback) whenever you need help. Sometimes on the weekends, I'm a little slow, but during the week, I'm trying to reach people as quickly as possible.

    I hope this helps.

    Sue.

  • APEX 4.2 - Dates of passage on the next page does not work. Bug?

    I'm working on upgrading applications 4.1.0.0.23 APEX to APEX 4.2.1 (Oracle 11 g).

    I have a page that is a select statement as follows:
    <-code
    Select TBL_ADMIN_COUNT. ADMIN_ID as ADMIN_ID,
    TBL_ADMIN_COUNT. ADMIN_EMPLOYEE as ADMIN_EMPLOYEE,
    TBL_ADMIN_COUNT. ADMIN_DATE as ADMIN_DATE,
    TBL_ADMIN_COUNT. ADMIN_GROUP as ADMIN_GROUP,
    : P1_SELECT_FROM as FROM_DATE: P2_SELECT_TO like TO_DATE
    of TBL_ADMIN_COUNT TBL_ADMIN_COUNT

    -end code >

    where the: P1_SELECT_FROM and: P1_SELECT_TO are the fields date (format MM/DD/YYYY) and the default value is: to_char (NEXT_DAY(sysdate,'MON')-7, ' MM/DD/YYYY')

    When the link that uses the FROM_DATE is generated, the URL ends up like this:
    ... f?p=75160:2:102604017305620::NO::P2_DATE_FROM,P2_DATE_TO:04%26#x2F;08/2013,.

    What is mess up the URL? This same code works fine on APEX 4.1

    It has been duplicated at apex.oracle.com:

    Workspace: CHECKDATES
    USER: GUESTUSER
    Password: datecheck

    Please notify.
    Thanks in advance for your help...

    You are dealing with the new security setting for your application. He escapes the URL for you...

    Under the app, change security attributes, browser security, set your HTML escaping mode Basic...

    Thank you

    Tony Miller
    Ruckersville, WILL

  • Do not have precisely the difference ECCAS current date and the date, we pass to the function.

    Hello

    I did a feature where when I go to any expiry date that I must check with the current date... and get the difference in days.

    When I change the value to this fuction 2012-01-05 and my current date is 2011-12-22 that I am getteing diffDays = 45, when I pass 2011-12-25 and my current date is 2011-12-22, then I'm diffDays = 34.

    I didn't know that's why 31 days added in my diffDays? If there are 31 days month so it will add 31 and if the month is 30 we can add 30 days? I didn't know where I am going wrong. I enclose my code that I use. Pls check and tell me where I'm wrong...

     public static String isBookExpired(String date) {
                System.out.println("**********");
                date = date.trim();
                int index = date.indexOf(" ");
                if(index != -1) {
                    date = date.substring(0, index);
                }
                    String strArr[] = stringtoArray(date , "-" );
    
                Calendar substribtionDt = Calendar.getInstance();
                //myCalendar.
                substribtionDt.set(Calendar.YEAR, Integer.parseInt(strArr[0]));
                substribtionDt.set(Calendar.MONTH, Integer.parseInt(strArr[1]));
                substribtionDt.set(Calendar.DATE, Integer.parseInt(strArr[2]));
    
                Calendar today = Calendar.getInstance();
    
                long diffDays = ( substribtionDt.getTime().getTime() - today.getTime().getTime()) / (24 * 60 * 60 * 1000);
    
                if(diffDays < 0) {
                    return "Yes";
                }
                else
                    return "No";
            }
    

    months in a calendar object index starts with 0 rather than 1 in the real world, you must set the value of the months in the calendar by subtracting by the date that you enter.

  • Acrobat Reader for Android, is the function of app.response () supported?

    When you use the app.response with javascript in Acrobat DC on the desktop in the pop - up dialog box appears. However, when you take this pdf file to a mobile device and open it with acrobat reader, reads the javascript code blocks the app. App.response is not supported or additional coding is necessary?

    Hi bob_safe,

    JavaScript has a very limited compatible mobile OS right now. See more details here: JavaScript for Acrobat Reader QAnywhere Mobile (Android)

    Thank you

    Abhishek

  • Verification of date for photos in the Metadata section?

    I have a lot of pictures I want to check the dates, if there is no indication in the metadata section. Is there another place or way I could get this info?

    Thank you.

    The drop-down list in the pane metadata value 'default '?

  • Loading data for planning in the Interface of EPMA

    Hi all
    I have worked in Essbase and planning Applications and have accomplished the task of loading data and the option Table Interface EPMA and planning.

    However I have a requirement, that is to say, I want to load planning data in the Interface Table...
    Is this possible? Everyone please help me...

    Thanks in advance

    If you want to fetch data from the essbase planning data and load into a table of interface?
    The table interface is essentially just a relational table, there are a number of ways to get order dataexport data, report script, cdf, essbase mdx.
    You could automate with scripts, ODI, or if you are willing to pay then stars analytical.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Function call to the C - Type not available library for one of the parameters in the Prototype of the function.

    Hello

    I do a work already done by others: implementation of a Wrapper to SQLite LabVIEW, I know how to do with .NET alas I would do that c, mainly for purposes of performance and my pointer poor knowledge is kinda make me stuck.

    Some information is kindly provided here:

    What I want to do is just to open a connection to an SQLite database (if not existing does not, the SQLite engine will create the embedded database and the corresponding file to save the data and everything). The function to perform the operation is indicated in the page below:

    It seems simple enough:

    int sqlite3_open(
      const char *filename,   /* Database filename (UTF-8) */
      sqlite3 **ppDb          /* OUT: SQLite db handle */
    );
    int sqlite3_open16(
      const void *filename,   /* Database filename (UTF-16) */
      sqlite3 **ppDb          /* OUT: SQLite db handle */
    );
    int sqlite3_open_v2(
      const char *filename,   /* Database filename (UTF-8) */
      sqlite3 **ppDb,         /* OUT: SQLite db handle */
      int flags,              /* Flags */
      const char *zVfs        /* Name of VFS module to use */
    );
    

    However, I'm struggling a bit on the following type:

    sqlite3 **ppDb          /* OUT: SQLite db handle */
    

    And I'm not really sure what type to use when calling this function of LabVIEW

    Any idea, I guess it's really easy, but I'm not really used to have a type which is I guess the DataInstance but as it is not clearly explicted in the C library function prototype interpreted LabVIEW (InstanceDataType is logical but not sure if) I'm not really sure what I show in the screenshot is valid or not.

    My VI seems to work like a charm, but am not sure if I'm doing something wrong.

    Another prototype that I have no idea on the appeal proper LabVIEW is the close function:

    I would like to get this straight, usually a parameter has a name, right? but seems not:

    int sqlite3_close(sqlite3*);
    int sqlite3_close_v2(sqlite3*);
    

    Similarly no idea about setting up for this one... must be regarded as the free forum like the one calling this function is... but I don't send any object?

    Really confusing...

    sqlite3*
    

    I might sound really stupid, but if someone could point me to a few tracks, I'd be really grateful for that.

    Thank you

    Ehouarn wrote:

    However, I'm struggling a bit on the following type:

    sqlite3 **ppDb          /* OUT: SQLite db handle */
    

    And I'm not really sure what type to use when calling this function of LabVIEW

    This parameter must be an integer of size pointer, passed by the pointer. No matter whether it was signed or not signed. The SQLite library will allocate memory for you, then put a pointer to this memory in full the pointer location as you go.

    Regarding the close function, you must pass the same integer pointer, but this time he passed by value (because it is referenced with a single *, not two). There is nothing wrong with the documentation by omitting the name of the parameter. For the application of a function prototype, the parameter name is without important, since everything you need to know is the type of data. How the service chooses to refer to this setting internally is irrelevant.

  • To an existing dashboard, how can I go back and discovers the source of data for the items in the dashboard? More precisely to determine why the data not displaying on the dashboard for a host where the agents seem to work fine.

    Here are the servers in the cluster.  The active cluster in the attached image is PrdERx2.  The zeros should have a count associated with them equal to zero.

    Thank you

    Barry

    Hi Barry -.

    If the dashboard in question was created with WCF (our Framework Web component that is included with the product), then using the tab design inspecting dashboard design suggested Bart is a good. WCF dashboard get much of their data by querying the Foglight data model so once you are in the editor of WCF, change views to queries drop-down list and see what queries can exist in this module WCF. Test if you find to make sure they return data. Also change the functions drop-down list and see if you can test as well.

    I hope this helps.

    Robert

  • Use of SRM policies to secure the data for non-DB Application

    Hello Experts,

    Can I use policies MEV to restrict access to data for users in the non Application of database?  Is it a requirement for users to have an Oracle database Id?

    Thank you very much in advance.

    Do you mean that you want to use the SRM in an environment where your session to share a connection diagram? Like most three-tier application? If so, no problem: strategy as CONTEXT_SENSITIVE and pick up Ideas of the real user through sys_context calls.

    --

    John Watson

    Oracle Certified Master s/n

    http://skillbuilders.com

  • To display the year when no data for this line

    Hello

    I am trying to achieve more,

    When I "No Data" for my year, the year should be displayed in chart (line/Bar) with "Zero" as a measure. (currently it removes my year with data '0' ie. 2009)

    I have the following data:


    Sales Rev year
    2008 100 1000
    2009 0 0
    1500 150 2010
    1750 175 2011


    I tried following the advice of blogs... but I guess I could miss a step IMP.

    Any help is appreciated.

    Kind regards
    Jitendra

    Hello

    Try the implicit column

    http://OBIEE.nl/?tag=dimensional-modelling&paged=2

    Thank you
    deep

  • Set the date and time in the Mac Photos

    How can I change (adjust) date for photos. The box of the year, I cannot put in a four-digit date.

    I want to change the date to 01/30/1965

    What happens if you select the year field (you have the date field that is selected in the screen shot), and then either type the new year or up/down arrows on the right side of the forum

    LN

Maybe you are looking for

  • Satellite A215-S7428 unable to connect to internet by LAN cable

    Comes with * ethernet card - however.I can't connect to the internet through an ethernet cable. Card is "activated" and "Properties" indicate that it works. I moved the cable from the back of the XP laptop and XP has no problem so I expect no problem

  • Advise me on laptop for FreeBSD

    Advise me on laptop for FreeBSD, pls.I want cheapest new laptop with wi - fi.I try some selected models, but drivers for freebsd (and linux) away on this site.Do you know which model is the most compatible with freebsd (v5)?

  • Bluetooth Windows 7 USB port problem

    Hello I use a bluetooth class 1 dongle (manufacturer unknown) with the V 8.00.03 Premium toshiba bluetooth stack and a bluetooth headset. The specifications for the dongle are: Bluetooth V1.2, compatible USB V1.2/2.0 I have a strange problem when cha

  • How can I disable the BIOS on the Satellite M70-169 password

    I bought a satellite laptop series satellite-169 number. I registered the password using the Toshiba help utility that has been placed on the desktop, using the secure user function. After stop of the laptop and turned on, it prompted me to enter the

  • How to remove the library to reinstall a new

    My old desktop computer (Windows 7) dies, not able to start even upward. I had saved my iTunes library in October 2015 of a version update of iTunes. I now have a new laptop running Windows 7 Pro with a currently installed version of iTunes. When I c