[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

[sqr-users] Using On-Error=Skip



Hi All -
I created an SQR that needs to check for the existence of a table and if it
exists load the cust_id's to a temp table.
It works fine if the table exists but if it doesn't I get an error on
compile:
 
(SQR 5528) INFORMIX SQL PREPARE/DECLARE error -206 (ISAM: -111) in cursor 4:
   The specified table (aafp_targs) is not in the database.

Here is the code I use:
 
Begin-Setup
 
Begin-SQL
Create temp table tmp_LeadFIDs                        ! all CustIDs from the
Leads table (if exists)
(cust_id  integer
);
End-SQL
 
Begin-SQL On-Error=Skip
Insert into tmp_LeadFIDs
Select Distinct
cust_id
>From {$prefix}_targs                          ! prefix passed in LeadArgs
file
End-SQL
 
End-Setup
 
Does anyone have any other ideas on how to do this?
Thanks in advance,
Lori A Puntasecca
Forest Laboratories, Inc.
MIS- Data Tools Team
email:  <mailto:lori.puntasecca@frx.com> lori.puntasecca@frx.com
 



____________________________________________________________________  

 This e-mail and its attachments may contain Forest Laboratories, Inc.
proprietary information that is privileged, confidential or subject to
copyright belonging to Forest Laboratories, Inc. This e-mail is intended
solely for the use of the individual or entity to which it is addressed. If
you are not the intended recipient of this e-mail, or the employee or agent
responsible for delivering this e-mail to the intended recipient, you are
hereby notified that any dissemination, distribution, copying or action
taken in relation to the contents of and attachments to this e-mail is
strictly prohibited and may be unlawful. If you have received this e-mail in
error, please notify the sender immediately and permanently delete the
original and any copy of this e-mail and any printout.

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users