Db2 Sql Error Sqlcode 311
Contents |
get tips & solutions from a community of 418,478 IT Pros & Developers. It's quick
Db2 Sql Error Sqlcode 803
& easy. Sql Code = -311 P: 1 Vimala Alagarsamy I m db2 sql error sqlcode 104 sqlstate 42601 getting an sqlcode of -311 while performing multi-row insert.The sql works for a single row but does db2 sql error sqlcode 206 sqlstate 42703 not work for multiple rows.How to solve this? Jul 14 '08 #1 Post Reply Share this Question 1 Reply P: 27 spider007 What is the SQl that you are executing? http://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/codes/src/tpc/n311.html SQL0311N The length of string host variable number "
MainFrame >> DB2 Suggest New Category how 2 resolve the -311 sqlcode Question Posted / guest 1 Answers 10768 Views I also Faced E-Mail Answers Answer / http://www.allinterview.com/showanswers/152380/how-2-resolve-the-311-sqlcode.html shravan kumar.p If Length is not declared for varchar, sql code -311 will appears... by giving the varchar lenth in cobol+db2 pgm we can resolve this -311 sql code.. if wrong correct me.. thakyou... Is This Answer Correct ? 15 Yes 3 No Post New Answer Categories COBOL (884)JCL (728)CICS (459)DB2 (684)IMS (80)IDMS (42)Natural (43)ADABAS (9)REXX (23)Assembler (31)CLIST (6)QMF (30)MVS (12)OS390 (8)OS 2 (6)VSAM (177)QSAM (4)Sysplex (5)IBM MainFrame AllOther (160) More DB2 Interview db2 sql Questions Can we use group-by clause in sub-query? If 'yes' means,Will it be executed successfully or else If 'no' means why should we not using that method? Give me your suggestion please.... 1 Answers Hi i need to write a query on the following requirement. SELECT COMM_TEXT INTO :WS_MIKM_COMM_TEXT FROM MPIPROD.MIKMV01 WHERE ACCOUNT_NO = :WFD_ACCOUNT_NO AND (SUBSTR(COMM_TEXT,1,39) = :WS_COMMENT_TEXT AND SUBSTR(COMM_TEXT,47,14) = :WS_DENY_DESC) OR (SUBSTR(COMM_TEXT,1,39) = :WS_COMMENT_TEXT) The above query is to be modified. db2 sql error The requirement is if both the fields are equal then that has to be given priority. In the above query if it satisfies any one it comes out without checking if both being equal is possible. 1 Answers How can you display the current date & current time ? 1 Answers Cap Gemini, 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. 0 Answers What is RUNSTATS? 3 Answers