What error I will get if my select query gives multiple
row while executing a Cobol-DB2 program.How can I solve it
without using a cursor.
Answer Posted / santy
u will get -811 error code.
this will b solve in different way. first u have to find
out y this error comes.
exmple :-
If u r selecting the address of the emp with help of
Name key, then may b same name contain 2 different address,
as per the business need, it may contain 1 defualt address
and other is alternet address.
So as per the business need find out that which address
u want to select, and as per this need u can use one flag
veriable to differentiate these 2 address. make the change
as per above in ur table. with the help of solution u can
solve the above problem without using the cursor.
Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
How to compare data between two tables in db2?
What is a db2 table?
What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?
SET is the ANSI standard for variable assignment, SELECT is not. SET can only assign one variable at a time, SELECT can make multiple assignments at once. If assigning from a query, SET can only assign a scalar value. If the query returns multiple values/rows then SET will raise an error. SELECT will assign one of the values to the variable and hide the fact that multiple values were returned (so you'd likely never know why something was going wrong elsewhere - have fun troubleshooting that one) When assigning from a query if there is no value returned then SET will assign NULL, where SELECT will not make the assignment at all (so the variable will not be changed from it's previous value) As far as speed differences - there are no direct differences between SET and SELECT. However SELECT's ability to make multiple assignments in one shot does give it a slight speed advantage over SET.
Define buffer pool.
Discuss about db2 bind?
What is dbrm? What it contains?
What is the default page size of buffer pools?
What is dpf in db2?
Which component is responsible for db2 startup and shutdown?
How do we specify index to include or not during bind process.
What is the role of the data page in the db2 database?
What is iseries database?
What is rebind in db2?
define clustering index.