[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Ways to clear a lookup table.
How about adding a "clear table" section ? As an example:
while 1
do Get-Lookup-Where-Clause
do Clear-Lookup-Table ! This section will
either delete or truncate the lookup table
do Build-LookupTable-ABC
do Other-Things
end-while
begin-procedure Clear-Lookup-Table
begin-sql on-error=sql_error
truncate table ps_LookupTable-ABC ! Your specific table name here
end-sql
end-procedure Clear-Lookup-Table
*Haixiang Yee <hyee@SMTPGW.ARMS.OHIO-STATE.EDU> on 01/07/2000 11:01:10 AM
Please respond to sqr-users@list.iex.net
To: SQR-USERS@list.iex.net
cc: (bcc: Rick Creel/IT/Aon Consulting)
Subject: Ways to clear a lookup table.
Hi,
I have a program that builds a lookup table through each
iteration under different criteria. Apparently, the table
does not get cleared each time you rebuild it based
on different criteria. In fact, it produces an error
if I try to build it a second time. Its there ways to get
around this?
For example:
while 1
do Get-Lookup-Where-Clause
do Build-LookupTable-ABC
do Other-Things
end-while
It would error out during the second iteration of the loop.
Thanks,
-Hai