|
View previous topic :: View next topic
|
| Author |
Message |
poongs Warnings : 1 New User
Joined: 24 Jan 2007 Posts: 28 Location: pune
|
|
|
|
Hi everybody
Can we move the updated field of the table into the host variables?means directly can we give "into :host-var" clause in teh updte stmt? |
|
| Back to top |
|
 |
guptae
Moderator

Joined: 14 Oct 2005 Posts: 1209 Location: Bangalore,India
|
|
|
|
Hi There,
Yes we can directly use host variable as follows
| Code: |
UPDATE ILF006VW
SET POLICY_CLASS =
:AIS-MIG-POLICY-HEADER-VIEW.POLICY-CLASS
WHERE POLICY_NUMBER =
:AIS-MIG-POLICY-HEADER-VIEW.POLICY-NUMBER |
|
|
| Back to top |
|
 |
poongs Warnings : 1 New User
Joined: 24 Jan 2007 Posts: 28 Location: pune
|
|
|
|
Hi
thnx for the reply....i got an idea on that....but i'm not sure...whether we can use the "into :host-var" clause in the update stmt....an example wud be like the one below:
update date-1
set var1 = var1+1
into :ws-var
where var2 = 2
that is i'm upadating a field in the table as weel as i want to move the updated field into my host variable.is it possible...coz this may avoid another SQL stmt of selecting the updated filed....
thnx in advance. |
|
| Back to top |
|
 |
guptae
Moderator

Joined: 14 Oct 2005 Posts: 1209 Location: Bangalore,India
|
|
|
|
Hi poongs,
I think it would not work |
|
| Back to top |
|
 |
vini_srcna
Active User

Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
|
|
|
|
| It violates the Update statement Syntax. It will not work |
|
| Back to top |
|
 |
poongs Warnings : 1 New User
Joined: 24 Jan 2007 Posts: 28 Location: pune
|
|
|
|
| thnx everybody for clearing my doubt... |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Another way to think of it might be that we "read" into and we "write" from. |
|
| Back to top |
|
 |
|
|