Can I use SYSDATE for retrieving data?

Hi all,
I'm working on MS Windows XP SP3 and my date format in oracle is '01-DEC-2008'. Now I have created a table with DATE type column then I insert a record in it using the SYSDATE like this
INSERT INTO Birthdays (ID, Name, BDate)
VALUES (1, 'Zikas', SYSDATE)Then when I try to retrieve this record after I have inserted in (in the same day I mean) by the Select statement
SELECT *
FROM Birthdays
WHERE BDate = SYSDATEthere is no records retrieved. So how to insert a record with SYSDATE and then retrieve it also using SYSDATE?
Thanks in advance :)

Zikas,
Sysdate gives you current data and time and you saved your record in past (like 1 minute ago or 1 hr go), though date are same but time is different as mentioned in the previous post. Take a look this example and make sure you commit after insert.
CREATE TABLE birthday (
   id NUMBER,
   name VARCHAR2 (30),
   bday DATE
INSERT INTO Birthday (ID, Name, BDay)
VALUES (1, 'Zikas', SYSDATE)
commit;
SQL> select * from birthday where trunc(bday)=trunc(sysdate);
        ID NAME                           BDAY
         1 Zikas                          28-DEC-08Regards

Similar Messages

  • NEED HELP IN USING ALL_TAB_COLUMNS FOR RETRIEVING DATA???

    A table say T1 contains column like Emp_id,Code.
    and there are several Code like C1,C2,C3.
    Another table say T2 contains column like
    Emp_id,C1,C2,C3.Here the value of the code field of the
    T1 table is now column of the T2 table.And the amount of
    each code of T1 table is equal to column value of T2
    table.
    Now I want to retrieve data from T2 table like
    C1 200
    C2 300
    C3 140
    I cannot retrieve data like this using all_tab_columns.
    I can only getting the column_name but cannot its value.
    PLEASE HELP ME...
    Edited by: user630863 on Apr 8, 2009 11:37 AM

    emp_id | code
    001 | C1
    001 | C2
    005 | C3
    005 | C1
    002 | C2
    002 | C3
    Table T1
    emp_id | C1 | C2 | C3
    001 | 10 | 15 |
    002 | | 7 | 12
    005 | 45 | | 94
    Table T2
    I have written a query
    select column_name from all_tab_columns a,T1 b
    where a.column_name=b.code
    and table_name='T2'
    OUTPUT:
    C1
    C2
    C3
    But I Need data for each employee like
    001 C1 10
    001 C2 15
    002 C2 7
    002 C3 12
    005 C1 45
    005 C3 94
    Edited by: user630863 on Apr 8, 2009 1:28 PM

  • How can i use Progressbar for loading data to DataGridView using DataTable

    I have a datatable which have 3 columns and set this datatable to be datasouce of datagridview.
    I want to add 100000 rows into this  table while
     table is adding , I want Progressbar to calculate and show the remaining
    percentage.
    How can i do this ?

    I've seen this done 2 different ways.
    You could either set the ProgressBar.Maximum to: 100, or  to QuantityToLoad. 
    example:
    Option Strict On
    Option Explicit On
    Option Infer Off
    Public Class Form1
    Dim QuantityToLoad As Integer = 100000
    Dim increment As Double = 100 / QuantityToLoad
    Private Sub btnExample1_Click(sender As Object, e As EventArgs) Handles btnExample1.Click
    ProgressBar1.Value = 0
    ProgressBar1.Maximum = 100
    ProgressBar2.Value = 0
    ProgressBar2.Maximum = QuantityToLoad
    For i As Integer = 1 To QuantityToLoad
    'Some code
    'Some code
    'Some code
    'Done loading item
    ProgressBar1.Value = CInt(i * increment)
    ProgressBar2.Increment(1)
    Label1.Text = ProgressBar1.Value.ToString & "% complete."
    Label2.Text = CStr(Math.Round((ProgressBar2.Value / ProgressBar2.Maximum) * 100, 2)) & "% complete."
    Application.DoEvents()
    Next
    MsgBox("done")
    End Sub
    End Class
    “If you want something you've never had, you need to do something you've never done.”
    Don't forget to mark
    helpful posts and answers
    ! Answer an interesting question? Write a
    new article
    about it! My Articles
    *This post does not reflect the opinion of Microsoft, or its employees.

  • LSMW used only for master data upload?

    Hi
    Can you please let me know if LSMW is used only for master data upload or we can also use it for transaction data ?

    Hi Christino.
    I have come across a standard SDN thread which deals with the uploading master data, refer it:
    [SDN Reference for uploading master data using LSMW|how can we upload master data by using LSMW;
    [SDN reference for which uploading is preferred (Master data or Transaction data)|Which one is better for uploading data LSMW or ECATT ?;
    Good Luck & Regards.
    HARSH

  • Can you use SQL as a data source for a project in the same way you can in Excel?

    Excel allows you to create a data source that executes a SQL stored procedure, display that data as a table in a spreadsheet and have that data automatically refresh each time you open the spreadsheet. Is it possible to do the same thing in MS Project, displaying
    the data from the stored procedure as a series of tasks?
    Here's what I'm trying to do - I have a stored procedure that pulls task data meeting a specific criteria from all projects in Project Server. We're currently displaying this data as an Excel report. However, the data includes start dates and durations so
    it would be nice to be able to display it as a Gantt Chart. I've played around with creating a Gantt chart in Excel and have been able to do a very basic one, but it doesn’t quite fit our needs.

    No, You can not use sql as a data source for a project.
    You have 3 options to achieve it:
    1. You can create a Sharepoint list with desired column ,fill desired data in that list then you can create a MS project from Sharepoint List.
    2. You can create a SSRS report in which you can display grantt chart Joe has given you that link.
    3. You can write a macro in MPP which will take data from your excel. In excel you will fetch data from your stored procedure. write a schedule which will run every day to update your data or
    create an excel report in which will update automatically and write macro in mpp which will fetch the data then publish it so that it would be available to team members.
    kirtesh

  • What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?

    Hi All,
    I am new to TestStand. Still in the process of learning it.
    What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?
    Thanks in advance,
    LaVIEWan
    Solved!
    Go to Solution.

    Hi,
    Using the Parameters is the correct method to pass data into and out of a sub sequence. You assign your data to be passed into or out of a Sequence when you are in the Edit Sequence Call dialog and in the Sequence Parameter list.
    Regards
    Ray Farmer

  • I recently purchased an iPod touch for my classroom.  Can I use homesharing to transfer data from an app to my student's computers?

    I recently purchased an iPod touch for my classroom.  Can I use homesharing to transfer data from an app to my student's computers?

    No since you can only sync with one computer.
    To switch syncing computers:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities

  • 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.

  • Use Firefox for sensitive data & use a virtual keyboard plus internet antivirus. This current version does not allow such or an extension . Can you make provision for this?

    Use Firefox for sensitive data & use a virtual keyboard plus internet antivirus. This current version does not allow such or an extension . Can you make provision for this?

    Use Firefox for sensitive data & use a virtual keyboard plus internet antivirus. This current version does not allow such or an extension . Can you make provision for this?

  • Can I use JDeveloper for Data mining

    Can I use JDeveloper for Data mining, instead of using stand-alone data miner.
    Secondly, if I can, do we require to create another schema and run all the required scripts for data miner or it is not necessary.
    Thanks in advance.

    ODM 9i provided a JDeveloper Pluggin called DM4J. In ODM 10g, this was replaced by the standalone Oracle Data Miner GUI. In 10g, you can use the API in JDeveloper, but there is no support via wizards or viewers.
    However, models that you create via the API through JDeveloper could be used in Oracle Data Miner for testing, scoring, and model detail viewing.

  • Can I use iCloud for backup?

    Can I use iCloud for backup?

    To back up all your data you are better off getting an external hard drive.  For details on iCould, read: http://www.apple.com/icloud/.

  • DBCA can not use ASM for database storage due to following reason: Could no

    Hi
    I've a recently installed RAC11gR2(11.2.0.3) on HP-UX
    I installed Grid Infrastructure with grid user:
    Node1: # id grid
    uid=1100(grid) gid=1000(oinstall) groups=1031(dba),1021(asmdba)
    Node2: # id grid
    uid=1100(grid) gid=1000(oinstall) groups=1031(dba),1021(asmdba)
    I installed the Oracle Server with oracle user:
    Node1: # id oracle
    uid=1101(oracle) gid=1000(oinstall) groups=1031(dba),1021(asmdba),1033(oper)
    Node2: # id oracle
    uid=1101(oracle) gid=1000(oinstall) groups=1031(dba),1021(asmdba),1033(oper)
    All related Grid Infrastructure is functioning well in both nodes:
    $ crs_stat -t
    Name Type Target State Host
    ora.DATA.dg ora....up.type ONLINE ONLINE node03
    ora.FRA.dg ora....up.type ONLINE ONLINE node03
    ora....ER.lsnr ora....er.type ONLINE ONLINE node03
    ora....N1.lsnr ora....er.type ONLINE ONLINE node04
    ora.asm ora.asm.type ONLINE ONLINE node03
    ora.cvu ora.cvu.type ONLINE ONLINE node04
    ora.gsd ora.gsd.type OFFLINE OFFLINE
    ora....network ora....rk.type ONLINE ONLINE node03
    ora.oc4j ora.oc4j.type OFFLINE OFFLINE
    ora.ons ora.ons.type ONLINE ONLINE node03
    ora.scan1.vip ora....ip.type ONLINE ONLINE node04
    ora....SM1.asm application ONLINE ONLINE node03
    ora....03.lsnr application ONLINE ONLINE node03
    ora....d03.gsd application OFFLINE OFFLINE
    ora....d03.ons application ONLINE ONLINE node03
    ora....d03.vip ora....t1.type ONLINE ONLINE node03
    ora....SM2.asm application ONLINE ONLINE node04
    ora....04.lsnr application ONLINE ONLINE node04
    ora....d04.gsd application OFFLINE OFFLINE
    ora....d04.ons application ONLINE ONLINE node04
    ora....d04.vip ora....t1.type ONLINE ONLINE node04
    $
    The ASM instance are running well in both nodes
    Connected with oracle user, the listener has registered perfectly the ASM instance in each node:
    $
    $ lsnrctl status
    LSNRCTL for HPUX: Version 11.2.0.3.0 - Production on 16-MAY-2012 15:41:06
    Copyright (c) 1991, 2011, Oracle. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for HPUX: Version 11.2.0.3.0 - Production
    Start Date 16-MAY-2012 15:24:19
    Uptime 0 days 0 hr. 16 min. 47 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
    Listener Log File /u01/app/grid/diag/tnslsnr/node03/listener/alert/log .xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=16.0.0.133)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=16.0.0.136)(PORT=1521)))
    Services Summary...
    Service "+ASM" has 1 instance(s).
    Instance "+ASM1", status READY, has 1 handler(s) for this service...
    The command completed successfully
    $
    $
    DATA & FRA disk group are created:
    $
    $ echo $ORACLE_SID
    +ASM1
    $
    $ asmcmd
    ASMCMD>
    ASMCMD> ls -lt
    State Type Rebal Name
    MOUNTED EXTERN N DATA/
    MOUNTED EXTERN N FRA/
    ASMCMD>
    ASMCMD>
    The big issue is... that the DBCA can not see the diskgroups. When I choose ASM Storage it can not see them. It shows the chart in blank and if i try to write the disk group, so the following message appears: can not use ASM for database storage due to following reason: Could not connect to ASM due to following error: ORA-01034 ORACLE not available
    What can be passing in this case... ?
    Thanks in advance

    Thanks both
    Really the problem initially was because of this:
    [INS-06006] Passwordless SSH connectivity not set up between the following node(s): [node1, node2]. CVU may reports "PRVF-4007 : User equivalence check failed for user "user"" for same error
    and I had to install node1 first and after node2 manually and perhaps for this the product was not well linked.
    I resolved the problem establishing the keys with the wizard and after copying the following files from node1 to node2
    /home/grid/.ssh -------> /home/grid/.ssh
    authorized_keys
    known_hosts
    This is the procedure if you run the wizard at the node1.
    The problem is that the wizard creates the keys incompletely...
    Thanks

  • Drivers/Utilities CD..XP and VISTA..can I use vista for WIN7 64 bit install?

    Drivers/Utilities CD's, that came with the p-35 Motherboard..XP and VISTA..can I use Vista for WIN7 64 bit install, or download the chip set drivers for Awin7 BEFORE the OS install??
    MSI P-35 Platinum
    Q6600 Core 2 Quad
    Presently XP 32Bit
    NVidia geforce 8600GT
    8GB DDR2 SDRAM PC6400-800MHz
    Windows 7..waiting to be installed.
    Hello,
    I WANT TO DO A CLEAN INSTALL.I have Windows 32 Home XP, I have the Win7 OEM I want to install.
    When i bought my MSI mobo, it came with both the drivers and utilities for XP and Vista.   Can I use the chip set drivers and utilities for Vista, until i can go to MSI and download the latest chip set drivers?  When do i install these drivers....before the OS install, or after?
    Can I format these drives first, go in the BIOS change to boot sequence from Raptor Boot Drive to the DVD/Rom to boot the WIN7 from, or should I format while installing Win7?  
    Someone on another forum suggested that 1) disconnect the two droves, then install the OS on the boot drive, and2) before win7 install, make the proposed boot drive (NOT THE DVD/CD ROM the first choice priority for the boot sequence....is this right?
    Is it absolutely necessary to unplug the other two drives, while formatting and installing the WIN7 O.S.?  People tell me that there is a chance of the OS installing sometimes on the other drives.
    Also, if I want to change the now present boot drive Local disk letter (C) to my storage drive (G) and the other two drive letters, can I do this in manage disks, anytime, or only during windows setup install?
    Thx

      I've never had this much trouble hooking up a HDD.
           I have two IDE DVD/CD ROMS.  (My RAID MODE was IDE in XP OS, and still is with WIN7.)
           I have three SATA HDD's.
    After unplugging the SATA 2TB HDD while I installed the WIN7 OS on the 500 GB HDD (it was on the 74 RAPTOR, but I moved location, and made absolutly sure nothing went on my raptor)
      So today I decided to re-hook up the 2TB Storage HDD, and when I did, I went into bios,and to the cell menu, and LOAD ALL DEFAULT SETTINGS, so it could see my newly installed HDD,which I had all my backup Data from the previous HDD. I also checked and the RAID MODE was IDE, and the boot sequence was the WDC 500GB Boot/OS drive, rebooted,then I got that annoying blanked out screen with that blinking cursor, so I got back into the bios,and changed the 1st boot to the IDE Pioneer DVD/CD ROM, 2nd boot to the 500GB HDD, and rebooted again..still got that blinking cursor.
    I opened up the Mobo, checked and replugged all SATA, and power cables to the three HDDS, tried it again,then still got the blinking cursor.  Seems no matter what I change in the boot sequence,it never wants to boot properly
    ....AND THEN,
     I started with TAB > POST> started WINDOWS, then once it opened up, I went to manage Disks, saw all three HDDs were online and healthy.  Win. Explorer also listed them in that folder, in device manager, it listed all three too.
     The managed window showed this:
    74GB    (system,active,Primary partition)                       Storage
    2TB     (Primary partition)                                           Excessive Storage
    500GB  (Boot, page files,crash-Dump, Primary partition)   Operating system
    Both the PCI IDE BusMaster and ON-Chip SATA Controller were both ENABLED.
    Before I just got online, I tried RESTART, and it opened Windows the usual way,  so I hope I don't have any more problems. It worked fine BEFORE I just plugged in the 2TB HDD back in.
    I pretty much did what everyone suggested,except for leaving in the 74GB Raptor when I installed WIN7, which prompted me to format the drive prior to installing the OS.  Also, when I changed the IDE, RAID,and AHC1, to the AHC1 Mode, just before I installed Window7, like a few suggested, I also had problems, so after the install, I went back and changed it back to IDE.  My Floppy was an IDE, but I removed it from my system, and disabled in BIOS, but even a few times I went into Bios and saw that thje floppy was 1st Boot, even though I changed to either the DVD/CD Rom, or the 500GB boot drive.            
    So what is the preferred boot sequence?   

  • Is there any way we can set default value for a Date Attribute to current date in Master Data Services

    Is there any way we can set default value for a Date Attribute to current date in Master Data Services.
    I as well wants to know that is there any posibility to show Calendar control while input data into respective date attributes.
    Thanks.

    Hi Anagha,
    So far i havent found any way to set todays date by default from MMI, but i guess this flow should work as workaroud
    1. Add buisness rule which can set a default value when Date = NULL/Blank
    2.get the entity table ,use -select EntityTable from mdm.tblEntity where Name = '<enter entity name>'
    3.Go to that table and add a after update trigger like
    if uda_<entityid>_<attributeid(Date attribute)> = default value
    update uda_<entityid>_<attributeid(Date attribute)> =getdate() where id = <LastUpdatedRow>
    I will check on this too from my side.
    By the way AFAIK i dont think so calendar control integration is possible .

  • Can I use ODI for creating warehouse in MYSQL?

    Hi,
    I have Oracle 10g database. However, for the reporting and dashboarding purpose I want to create a warehouse.
    Can I use ODI to pick data from this existing Oracle 10g database and create a warehouse using MYSQL?
    Then I will use this MYSQL warehouse as source in OBIEE repository.
    Kindly help.
    Any documents/pointers would be really useful.
    Regards,
    Priya

    Hi,
    I have Oracle 10g database. However, for the reporting and dashboarding purpose I want to create a warehouse.
    Can I use ODI to pick data from this existing Oracle 10g database and create a warehouse using MYSQL?
    Then I will use this MYSQL warehouse as source in OBIEE repository.
    Kindly help.
    Any documents/pointers would be really useful.
    Regards,
    Priya

Maybe you are looking for

  • Please help transfer songs from itunes to ipod

    I just got my ipod nano today. I downloaded the iTunes 7 off the internet and it works fine. But every time i click the sync button the message "Songs on the ipod cannot be updated because all of the playlists selected for syncing no longer exist" co

  • Intego virrusbarrier problems 10.6.2 snow leopard

    Ok, so since i installed virus barrier, the program has been a resource hog. I mean at times it is taking up to 600 MB, but typically when i'm having issues it's around 370MB. That is a crazy amount of memory! So that is not the issue. When i'm worki

  • F101 - Sort Order

    The report displayed by this Transaction displays Documents from GL, AR and AP. The document display seem to be in no particlar order. May be it showing the AP documents grouped by the Cost Centre? But then what logic for the GL Documents? The dates

  • Completion date for manually created maintenance notification

    Hi All, When closing maintenance notification created manually by t-code- IW21,there is no field to enter completion date & time. System is proposing the current  date as completion  date by default. However , as I have flagged u201Ccompletion datau2

  • Gridlayout error in dialog

    Hello, I wondered if anyone could advise, in this dialog code I was hoping the first panel to display the labels and textfields as 2 columns, with 3 rows. The second panel works fine, could anyone see the problem in the first? Thank you The first pan