1. Community Tip: Please Give Thanks to Those Sharing Their Knowledge.
    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.
  2. Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)
    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

Getting the date at the end of a query

Discussion in 'Scripting' started by rallingham, Aug 17, 2012.

  1. rallingham

    rallingham ADSM.ORG Senior Member

    Joined:
    Dec 16, 2003
    Messages:
    560
    Likes Received:
    25
    Occupation:
    Sr. TSM Solutions Specialist
    Location:
    Greater Niagara Region. Welland
    I know that I can do a command for the admin command line like: q drm > c:\tmp\q_drm.txt and the data will go to a txt file. I also know that I can append by using >>. My question is this. Is there a way to add the system date on to the outuput so that it would be like: q drm > c:\tmp\q_drm.date or something like that? Anyone?
     
  2.  
  3. Harry_Redl

    Harry_Redl Moderator ADSM.ORG Moderator

    Joined:
    Dec 29, 2003
    Messages:
    2,271
    Likes Received:
    136
    Occupation:
    IT Consultant
    Location:
    Czech Republic
    Hi,

    what about
    issue message I SystemDate
    select date_time from actlog where message like 'ANR1496I SystemDate%' and cast(minute(current_timestamp-date_time) as decimal) < 5 >>sysdate.txt

    Harry
     
  4. rallingham

    rallingham ADSM.ORG Senior Member

    Joined:
    Dec 16, 2003
    Messages:
    560
    Likes Received:
    25
    Occupation:
    Sr. TSM Solutions Specialist
    Location:
    Greater Niagara Region. Welland
    Thank you. I will give that a try.
     

Share This Page