[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Insert Stmt.
- Subject: RE: [sqr-users] Insert Stmt.
- From: "Bartlett, Dwain" <dbartlett@state.mt.us>
- Date: Mon, 27 Dec 2004 14:40:29 -0700
- Delivery-date: Mon, 27 Dec 2004 16:41:37 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: AcTsXE27MiiS5lYfTe6+/rQ/mE/LIwAACFjw
- Thread-topic: [sqr-users] Insert Stmt.
Change your statement begin-SQL on-error=SQLError to begin-sql on-error=myerror
Create a procedure called myerror and set a flag to indicate that there is an
error, and then after your end-sql before you do the other inserts test to see
if the flag is set. Don't forget to reset the flag, before your first insert.
Dwain Bartlett
SABHRS Services Bureau, ITSD
HR Systems Analyst
(406) 444-0418
dbartlett@mt.gov
-----Original Message-----
From: sqr-users-bounces+dbartlett=state.mt.us@sqrug.org
[mailto:sqr-users-bounces+dbartlett=state.mt.us@sqrug.org]On Behalf Of
radhika reddy
Sent: Monday, December 27, 2004 2:34 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] Insert Stmt.
Hi,
I am trying to find solution for the following problem in SQR. Hope i get
some ideas from you. I am working on Conversion program where i am inserting
values into one table(using some validations). My requirement is if the
insert is not successful then i should not insert values into 2nd and 3rd
tables.
Example,First insert statement is:-
begin-procedure INSERT-table
begin-SQL on-error=SQLError
INSERT INTO PS_job(
EMPLID,
EMPL_RCD,
EFFDT,
EFFSEQ,
DEPTID,
JOBCODE)
values
($Emplid,
&A.EMPL_RCD,
&A.EFFDT,
&A.EFFSEQ,
'E',
''
)
end-SQL
END-PROCEDURE
if this insert is not successful then i should not insert values into 2nd
and 3rd tables.
any ideas?
Thanks
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
hthttp://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users