ADSM-L

SQL queries for Server Scripts

2000-08-31 11:55:19
Subject: SQL queries for Server Scripts
From: Tim Melly <Tim.Melly.B AT BAYER DOT COM>
Date: Thu, 31 Aug 2000 11:40:23 -0400
Hi all,

I'm in the process of implementing "server scripts" and could use some
assistance with SQL queries.
Prior to scheduling a "full" database backup, I want to check if a full DB
backup has already been performed that day.
I'm performing a migration prior to executing the DB backup so i was going to
check the stgpool.chg_time vs. db.last_basckup_date. The query would look like
this:

select stgpool.chg_time, db.last_backup_date from stgpools, db
where stgpools.stgpools_name='BACKUPPOOL'
and stgpool.chg_time <= db.last_backup_date

I want to compare the hh:mm portion of the timestamp. Does anyone know how to
extract the hh:mm portion of the
timestamp.

Any assistance with timestamp formatting would be greatly appreciated.


Thx, Tim Melly
         Sr. IS Analyst
         Bayer Corporation
<Prev in Thread] Current Thread [Next in Thread>