View previous topic :: View next topic
|
Author |
Message |
jonnavarapu786
New User
Joined: 28 Mar 2007 Posts: 2 Location: noida
|
|
|
|
First one.
Suppose, my embeded sql is fetching two rows.(Iam not using cursors).
I will get -811 sql error, my question is what value will come to host variables.
ex: SELECT ename INTO : HV_ename FROM emp WHERE sal = 5000;
Second one,
suppose, in a update/insert SQL query for vachar field, I given/moved length = 10, text = 20 chars. what will happen while updating/inserting.
is only 10 chars of the text is updated/inserted or 20 chars of the text.
plz clarify ........
Third one.
Is it possible to code a direct sql update query in COBOL- DB2 pgm.
ex: update emp_table set sal = 6000 where sal = 5000;
Eagarly waiting for ur valuble correct answers...... |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi jonnavarapu786 !
First :
Nothing is inserted into your host-variables, they aren't changed
Second:
10 bytes, correct me if i'm wrong
Third:
Yes
Regards, UmeySan |
|
Back to top |
|
|
pyar Warnings : 1 New User
Joined: 15 May 2006 Posts: 4
|
|
|
|
Hi,
1st row values will be there with host variables,
while retriving the 2nd row only you will get -811
Correct me if i am worng
Thanks,
Pyari |
|
Back to top |
|
|
ashwinreddy
Active User
Joined: 16 Sep 2004 Posts: 106 Location: Hyderabad
|
|
|
|
Hi,
1st
When your query results in more than 1 row then the program abends with -811 without any values in Host variable.
If you have given as ignore -811 condition then you will get the first row.
2nd
As far as i know it will update the 20 chars (updating 10 char with ur input and rest with spaces).
3rd
Question is confusion for me.
Do you intend with using any host variables, if so you can.
Cheers
Ashwin |
|
Back to top |
|
|
|