Re: SQL emergency question
Posted in 1999
Hi
UNLOAD TO "chg_dates.sql" DELIMITER ""SELECT "UPDATE "||TRIM(tabname)|| " SET " || TRIM(colname)|| " = '06/21/1999'
" || " WHERE " || TRIM(colname) || " = '07/14/2019' ;"
FROM syscolumns SC,systables ST
WHERE SC.tabid = ST.tabid
AND coltype = 7
AND SC.tabid > 99
AND tabtype = "T";
The output of the statement gets unloaded to upd.sql.
HTH,
Harinath Venkata
New York.
"-=Eclypse=-" <eclypse@cdc.net> on 06/22/99 11:49:54 AM
Please respond to "-=Eclypse=-" <eclypse@cdc.net>
To: informix-list@iiug.org
cc: (bcc: Harinath Venkata/HAVE01/SHB)
Subject: SQL emergency question
This past weekend we upgraded one of our RS/6000s and in the process the NVRAM
on
the box got corrupted. The date got changed to 7/14/2019 and went unnoticed
until
Monday morning. We run BaaN and Informix on the backend. Several transactions
were processed before we caught the date error. We have approximately 80000
tables
in our database and several of those have columns of type "DATE".
What I need help with is the wording on an SQL statement to find any table with
a
column type of "DATE" with the value in that column equal to "07/14/2019" and
change it to "06/21/1999" anywhere in the database. Any help is appreciated!
--
Jon Freeland<*>
Informix DBA
Miller Industries, Inc.
jon@millerind.com
eclypse@babylon5.cdc.net