No querryresult because of using sysdate

Something is wrong with my date format. I receive no results in the querry after I use the following code in trigger key-menu
begin
if Get_Item_Property(:system.cursor_item, DATATYPE)='DATE' then Copy(trunc(sysdate) , :System.Cursor_Item);
end if;
end;
wenn I write the date into the field by hand without the a.m. trigger I receive datas from the querry. something is wrong with my dateformat, but what?
mfg
robert

sorry, it does not work. before starting the querry the following trigger is done:
if :system.tab_new_page='FALSCH_VERLADEN' then
go_block('K_FALSCHGELADEN_VW');
clear_block(no_validate);
set_block_property(:system.current_block, default_where, 'Lieferdatum>=:AB2.von AND
Lieferdatum<=:AB2.BIS');
     go_block('AB2');
clear_block(no_validate);
end if;
ENTER_QUERY;
after that I press f5 to do trigger key-menu to set the query-date:
if Get_Item_Property(:system.cursor_item, DATATYPE)='DATE' then
     Copy(TO_CHAR(trunc(sysdate), 'DD.MM.RR') , :System.Cursor_Item);
end if;
the same trigger is used for field ab2.von and ab2.bis
then I press button for execute querry. the following trigger is done:
if :system.tab_new_page='FALSCH_VERLADEN' then
go_block('K_FALSCHGELADEN_VW');
END IF;
EXECUTE_QUERY;
maybe that helps. I have no Idea why it is wrong. if I use the following code in the key-menu trigger for :ab2.von and :ab2.bis it works:
     if Get_Item_Property(:system.cursor_item, DATATYPE)='DATE' then
     :ab2.bis := sysdate;
end if;
any idea??
robert

Similar Messages

  • Using SYSDATE in RMAN script

    Hi
    Each night I move an RMAN backup from a PROD server to a test server.
    Then using RMAN script with NOCATALOG, I restore/recover the database on the test server as show below:
    RUN{
    ALLOCATE CHANNEL dev1 DEVICE TYPE DISK;
    STARTUP NOMOUNT;
    RESTORE CONTROLFILE from AUTOBACKUP;
    SHUTDOWN;
    STARTUP FORCE MOUNT;
    RESTORE DATABASE;
    RECOVER DATABASE;
    ALTER DATABASE OPEN RESETLOGS;
    Of course the script fails at the "RECOVER DATABASE" command because it runs out of ARCH logs to apply at some point and therefore never gets to the final command of DATABASE OPEN. I would like to change that line to something like:
    RECOVER DATABASE UNTIL TIME 'SYSDATE:02:45:00';
    The above fails with an RMAN error of "expected number".
    Of course I could use SET UNTIL TIME "to_date('SYSDATE 02:45:00','DD-MON-YYYY HH24:MI:SS')"; although I have the same problem, i.e., getting RMAN to accept SYSDATE as the date portion of the point in time recovery.
    Oddly, from an RMAN prompt and within brackets, I can issue the following command successfully:
    RMAN {
    set until time "to_date('SYSDATE 02:45:00','DD-MON-YYYY HH24:MI:SS')";
    command completed successfully
    So my question is, how can I use SYSDATE in an RMAN point in time recovery and have sysdate represent the current date, either in the RECOVER DATABASE line or the SET UNTIL TIME line?
    Thanks.

    user522620 wrote:
    Hi
    Each night I move an RMAN backup from a PROD server to a test server.
    Then using RMAN script with NOCATALOG, I restore/recover the database on the test server as show below:
    RUN{
    ALLOCATE CHANNEL dev1 DEVICE TYPE DISK;
    STARTUP NOMOUNT;
    RESTORE CONTROLFILE from AUTOBACKUP;
    SHUTDOWN;
    STARTUP FORCE MOUNT;
    RESTORE DATABASE;
    RECOVER DATABASE;
    ALTER DATABASE OPEN RESETLOGS;
    So my question is, how can I use SYSDATE in an RMAN point in time recovery and have sysdate represent the current date, either in the RECOVER DATABASE line or the SET UNTIL TIME line?
    Thanks.
    Given:
    SQL> alter session set NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS';
    SQL> select to_char(trunc(sysdate)+(2/24)+(45/1440),'dd-mon-yyyy hh24:mi') from
    dual;
    TO_CHAR(TRUNC(SYS
    25-JUN-2012 02:45:00
    Use this (uses to_date)
    RUN{
    set until time "to_date(trunc(sysdate)+(2/24)+(45/1440),'DD-MON-YYYY HH24:MI:SS')";
    ALLOCATE CHANNEL dev1 DEVICE TYPE DISK;
    STARTUP NOMOUNT;
    RESTORE CONTROLFILE from AUTOBACKUP;
    SHUTDOWN;
    STARTUP FORCE MOUNT;
    RESTORE DATABASE;
    RECOVER DATABASE;
    ALTER DATABASE OPEN RESETLOGS;
    ## if that command fails, it will fall to the next command as the run blocks are autonomous.
    RUN{
    ALTER DATABASE OPEN RESETLOGS;
    }

  • How to use SYSDATE as a default value of a bind variable in a query report?

    Hi,
    I want to use SYSDATE as default value for a bind variable in Query based report.
    I don't see any way to do it, someone helps?
    Thanks a lot.
    Paulo.

    You can aslo use #sysdate directly.
    Hi,
    The way I'm doing in my report is, I have a database function (f_ret_sysdate) with the following code
    create function f_ret_sysdate return varchar2
    begin
    return to_char(sysdate,'mm/dd/yyyy');
    end;
    Now, in the 'Customization Form Display Options' section of the report I'm calling this function as #f_ret_sysdate in the default value field of corresponding bind variable to display SYSDATE with the format.
    Hope this helps!...
    -Krishnamurthy

  • I have two itunes accounts because I used a second email address by mistake as an id.  Can I merge them?

    I have two iTunes accounts because I used a second email id by mistake years ago and have lived with it ever since.  How can I merge them to access all my music in one place?

    no way yet.

  • Whenever I try to download a new application, my parent's apple id shows up instead of mine which is on my computer. My mom doesn't want to put down her credit card information because I use gift cards. How do I change the ID on my ipod to my apple ID?

    Whenever I try to download a new application, my parent's apple id shows up instead of mine which is on my computer. My mom doesn't want to put down her credit card information because I use gift cards. How do I change the ID on my ipod to my apple ID?

    thank you so much lllaass. im an idiot for not finding that out.

  • HT3702 why did i get charged three times for the same purchase? is it because i use my apple id on three devices.. two iphones, and ipad... and and macbook geez apple i support you enough can i just pay for one copy of the audiobook

    why did i get charged three times for the same purchase? is it because i use my apple id on three devices.. two iphones, and ipad... and and macbook geez apple i support you enough can i just pay for one copy of the audiobook

    These are user-to-user forums, you are not talking to Apple here.
    If it was an audiobook then they are one-time only downloads, to get it on your other devices you need to sync it to them and not re-download it oneach. You can try contacting iTunes support and see if they will refund or credit you for the second and third downloads : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • My hard drive crashed on me Macbook Pro.  After it was replaced I could not reload Aperture 3 because I used the wrong S/N twice.

    I tried to reload Aperture 3 on my newly replaced hard drive and was unsuccessful because I used the wrong S/N twice.

    See this knowledge base article:
    Troubleshooting Professional Application Serial Numbers http://support.apple.com/kb/TS2005
    Try to remove your System ID file(s) and enter your serial number(s) again:
    The System IDs are located here:
    /Library/Application Support/ProApps/
    If present, remove the file Aperture System ID, then launch the Aperture and enter your serial number.
    Regards
    Léonie

  • My mac book air can't start installation, because i use windows installation in DOS to make partion, now no mac os on it. How to get back the mac os? i have a window based iso image from a friend, because in my country there is no Apple service.

    my mac book air can't start installation, because i use windows installation in DOS to make partion, now no mac os on it. How to get back the mac os? i have a window based iso image from a friend, because in my country there is no Apple service.

    It sounds like you destroyed your boot partition and the recovery partition.  Depending on it's age, your MacBook Air might be able to do a net boot.  Plug and ethernet connection into it and attempt to boot.  If it has the right firmware, it will find a net boot configuration on the net and boot that.  Then it will give you a Recovery Partition like display and allow you to reinstall the OS X version that came with it.... assuming that it was Lion or ML.  If your computer came with Snow Leopard, then even the net boot won't work. 
    At that point you need a bootable USB Key, or an external DVD drive AND a Snow Leopard installation DVD. 
    An Apple Store, if there is one nearby, MAY be able to get you going again.  However, whatever is on the SSD now will be toast too.

  • Count of a query in Unix environment and use sysdate

    hi,
    i have a code below and i want this to be used in Unix env and i need to use sysdate where i hard coded the date but the time should remain as it is.
    select count(type),type from ebizp.bchistevent
    where (type = 'com.avolent.apps.event.LoginEvent' or type = 'com.avolent.apps.event.LogoutEvent')
    and(to_char(createdt, 'dd/mm/yy hh24:mi s') between '28/01/13 08:00:00' and '28/01/13 09:00:00')
    AND ( bucket = to_char(sysdate-1, 'YYYYMM') OR bucket = to_char(sysdate, 'YYYYMM') OR bucket = 0)
    group by type
    like it should be between 'sysdate 08:00:00' and 'sysdate 09:00:00')
    please suggest.

    Dates should be compared with dates values. Don't use to_char to compare date values.
    And dont use "TYPE" as a column name - it is a reserved key word..
    select count(type), type
    from ebizp.bchistevent
    where (
        type = 'com.avolent.apps.event.LoginEvent'
        or type     = 'com.avolent.apps.event.LogoutEvent'
    AND createdt BETWEEN trunc(sysdate)+(8/24) AND trunc(sysdate)+(9/24)
    and (
      bucket = to_char(sysdate-1, 'YYYYMM')
      or bucket    = to_char(sysdate, 'YYYYMM')
      or bucket    = 0
    GROUP BY type;And you can simplify the query
    select count(type), type
    from ebizp.bchistevent
    where type in
        ('com.avolent.apps.event.LoginEvent','com.avolent.apps.event.LogoutEvent')
    AND createdt BETWEEN trunc(sysdate)+(8/24) AND trunc(sysdate)+(9/24)
    and bucket in
         (to_char(sysdate-1, 'YYYYMM'),to_char(sysdate, 'YYYYMM'),'0')
    GROUP BY type;Edited by: jeneesh on Feb 19, 2013 2:42 PM

  • I cannot update an app because I used a different ID when I purchased it and I have no record of it. How can I find out the ID and password

    I cannot update an App because I used  an ID and password  to purchase the APP that I no longer can retrieve. Is there anyway that I can find out that information ?

    Try here > Associating and verifying email addresses with your Apple ID
    And here > Is there a way to find my Apple ID Name if I can't remember it?
    Frequently Asked Questions About Apple ID

  • Using 'SYSDATE' function in ACCESS 2000?

    'SYSDATE' function is not working in ACCESS 2000 , is there any other
    alternative function available in access.
    I use a select statement using SYSDATE, but it did not work.

    I found it already.
    use the now() function.

  • Can I use SYSDATE in the WHERE clause to limit the date range of a query

    Hi,
    Basicaly the subject title(Can I use SYSDATE in the WHERE clause to limit the date range of a query) is my question.
    Is this possible and if it is how can I use it. Do I need to join the table to DUAL?
    Thanks in advance.
    Stelios

    As previous poster said, no data is null value, no value. If you want something, you have nvl function to replace null value by an other more significative value in your query.<br>
    <br>
    Nicolas.

  • HT4101 My iPad is tellin me I can not use the camera connector because it uses too much power..... ***

    My iPad is tellin me I can not use the camera connector because it uses too much power..... ***

    I'm having same problems.   If I connect my blackberry it says it uses too much power.  If I take sd card out of phone and connect that way I get the same message.    The leaflet with the connector says go to Apple.com/support/iPad to find list of compatible cameras..........  I'm still trawling the site to find any such list!    Just need to know if it will work with a blackberry .....  If not I've got to take it back.    Have been advised by a friend to cut my losses get my money back and use Bump to transfer my pics.    I don't own a traditional camera because my phone has a great one.  Really don't want to have to carry a camera about with me!   They don't make it easy do they!   

  • I cannot watch Flash vids because Firefox uses too much CPU.

    Firefox has become untenable because it uses too much CPU and disrupts Flash videos.
    I've tried disabling or changing the values of plugins. Installing older versions. Nothing helps. It just sucks. It makes me want to pull someone's lungs out.

    Everyone has this problem, since Firefox rigged one of its Plug-ins (something to do with crash reports) about 06 months ago, to max out CPU, thereby sabotaging computer performance (including Flash videos).
    Why or how they haven't fixed it before now strains belief. I have seen the same complaint everywhere. It is a major fuck-up. People want to abandon Firefox in droves, except that none of the other browsers have decent add-ons like pop-up blocker.
    Sort it out, Firefox.

  • Using sysdate in a ejb 3.0 named query

    Hello,
    Giving the following ejb 3 Named query:
    @NamedQuery(name = "DcaMessage.findNew", query = "select o from DcaMessage o where o.nbAvisEmis<1 or (o.indMsgConsulte=0 and sysdate-o.dtDernierAvis>:nbJours)")
    The result is:
    Exception [TOPLINK-8004] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.EJBQLException
    Exception Description: A parsing problem was encountered resolving the alias - [sysdate].
    How do I use sysdate (or any other element) to compute the number of days between now and the date defined in dtDernierAvis?
    Thanks

    Hi,
    According to the EJB 3.0 specification, there are three date and time functions that can be used in EQL:
    functions_returning_datetime:=
    CURRENT_DATE |
    CURRENT_TIME |
    CURRENT_TIMESTAMP
    The datetime functions return the value of current date, time, and timestamp on the database server.
    I suppose your query should look like this
    @NamedQuery(name = "DcaMessage.findNew", query = "select o from DcaMessage o where o.nbAvisEmis<1 or (o.indMsgConsulte=0 and CURRENT_DATE-o.dtDernierAvis>:nbJours)")
    I never used these three functions myself, but it should be something like that.
    HTH, Wouter van Reeven

Maybe you are looking for