xquery - function to get max timestamp

Discussion in 'XML' started by nlounello@gmail.com, Dec 27, 2007.

  1. Guest

    How can I use the max function to get the record with the max
    timestamp?

    I'm thinking of using xmlexists but i'm having trouble knowing where
    exactly to place it.

    For example:
    SELECT * FROM COMPANY
    WHERE XMLEXISTS('$f//Company/Department/Employee@update_ts'
    passing XML_COLUMN as "f")

    <Company>
    <Department>
    <Employee startDate="mm/dd/yyyy"
    update_ts="2007-11-01-17.59.40.285000">
    <Name>John Doe</Name>
    </Employee>
    </Department>
    </Company>

    Thanks so much for your help!
     
    , Dec 27, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Kish
    Replies:
    11
    Views:
    817
    Jeff Kish
    Oct 21, 2004
  2. Oliver Wong
    Replies:
    2
    Views:
    479
    Philippe Poulard
    Feb 13, 2007
  3. Summercool
    Replies:
    9
    Views:
    912
    dorayme
    Oct 23, 2007
  4. Greg Ferris

    Textarea max rows and max characters per row

    Greg Ferris, Jan 16, 2004, in forum: Javascript
    Replies:
    2
    Views:
    619
    Greg Ferris
    Jan 16, 2004
  5. kriton
    Replies:
    0
    Views:
    357
    kriton
    Apr 22, 2005
Loading...

Share This Page