1. Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING) Click the link 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 message will disappear after you have made at least 12 posts. Thank you for your cooperation.

Getting the date at the end of a query

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

  1. rallingham

    rallingham Senior Member

    Joined:
    Dec 16, 2003
    Messages:
    496
    Likes Received:
    20
    Occupation:
    Sr. TSM Solutions Specialist
    Location:
    Greater Toronto Area Canada
    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

    Joined:
    Dec 29, 2003
    Messages:
    2,259
    Likes Received:
    134
    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 Senior Member

    Joined:
    Dec 16, 2003
    Messages:
    496
    Likes Received:
    20
    Occupation:
    Sr. TSM Solutions Specialist
    Location:
    Greater Toronto Area Canada
    Thank you. I will give that a try.
     

Share This Page