Db2 Error Sql0206n
Contents |
context where it is used. SQLSTATE=42703 Technote (FAQ) Question Why do I see the error SQL0206N "MET.OBJECT_COL_L_READS" sqlstate 42704 is not valid, when I run the db2exfmt command ? Answer
Sqlcode=-104, Sqlstate=42601
After migrating your database from a DB2 lower version to v10.5 you may encounter this issue. db2exfmt -d IMGRDB -1 -g -o exfmt1.out DB2 Universal Database Version 10.5, 5622-044 (c) Copyright IBM Corp. 1991, 2012 Licensed Material - Program Property of IBM IBM http://www.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.messages.sql.doc/doc/msql00206n.html DATABASE 2 Explain Table Format Tool Connecting to the Database. Connect to Database Successful. Error during Prepare, near line 17759. Error Message = SQL0206N "MET.OBJECT_COL_L_READS" is not valid in the context where it is used. SQLSTATE=42703 SQLCA Size = 136 SQLCODE = -206 Tokens = MET.OBJECT_COL_L_READS Function= SQLNQ075 RC = 0x801A006D = -2145779603 Reason = http://www.ibm.com/support/docview.wss?uid=swg21697669 0x0000 = 0 Reason2 = 0x0000 = 0 Line # = -10 Warning flags = Even though the explain plan is generated we see the following message at the end of the explain file. No Explain instances (plans) were found for database
here for a quick overview of http://stackoverflow.com/questions/9072593/sql0206n-sqlstate-is-not-valid-in-the-context-where-it-is-used-sqlstate-42703 the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions db2 error Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up SQL0206N “SQLSTATE” is not valid in the db2 error sql0206n context where it is used. SQLSTATE=42703 up vote 1 down vote favorite the following code when executed using db2 -td@ -f./sql/update_product.sql gives error as: SQL0206N "SQLSTATE" is not valid in the context where it is used. LINE NUMBER=53. SQLSTATE=42703 Please help... SET SERVEROUTPUT ON @ CREATE OR REPLACE PROCEDURE UPLOADPRODUCTATTRIBUTES BEGIN DECLARE v_eisidentifier VARCHAR(100); DECLARE v_categoryGuid DECIMAL(19,0); DECLARE v_localeGuid DECIMAL(19,0); DECLARE v_realmGuid DECIMAL(19,0); DECLARE v_catchingPhrase VARCHAR(120) ; DECLARE v_genericName VARCHAR(80); DECLARE v_ingredients VARCHAR(900); DECLARE v_quantity VARCHAR (60); DECLARE v_dose VARCHAR(40); DECLARE v_nutritionFacts VARCHAR (900); DECLARE v_productDescription VARCHAR(900); DECLARE v_recommendedFor VARCHAR(200); DECLARE v_promotionMessage VARCHAR(200); DECLARE v_message VARCHAR (4500); DECLARE v_proudctGuid DECIMAL(19,0); DECLARE C1 CURSOR FOR SELECT EISIDENTIFIER, CATEGORY_GUID, LOCALEGUID, REALMGUID, CATCHING_PHRASE, GENERIC_NAME, INGREDIENTS, QUANTITY, DOSE, NUTIRITION_FACTS, PRODUCT_DESCRIPTION, RECOMMENDED_FOR, PROMOTION_MESSAGE, MESSAGE FROM TEMP_UPLOAD_PRODUCT_ATTRIBUTES; OPEN C1; FETCH C1 into v_eisidentifier, v_categoryGuid, v_localeGuid, v_realmGuid, v_catchi