Db2 Sql Error Sqlcode=-313 Sqlstate=07001
Contents |
360 games PC games db2 sql error sqlcode 104 sqlstate 42601 Windows games Windows phone games Entertainment All Entertainment db2 sql error sqlcode 206 sqlstate 42703 Movies & TV Music Business & Education Business Students & educators
Db2 Sql Error Sqlcode 407 Sqlstate 23502
Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet http://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/codes/src/tpc/n313.html Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All https://support.microsoft.com/en-us/kb/819528 Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
Events Forums DB2-LDB2-L ArchivesNA ConferenceEMEA Conference Resources BlogsIDUG eBulletinIDUG NewsroomCommunitiesRegional User Groups Articles&Content IDUG Content ArticlesTech ChannelBeginner's BlogDB2 Hot Topics BlogContent LibraryIDUG YouTubePast Conference ContentCodeplace Library GetInvolved Volunteering with IDUGVolunteer PositionsJoin a Regional User GroupBecome an IDUG MentorSponsorship OpportunitiesJoin a CommunitySpeaker Community SQL code -313 http://www.idug.org/p/fo/et/thread=6724 Carlton Enuda SQL code -313 April 2, 2001 06:00 PM Hi everyone, I'm http://www.dbforums.com/showthread.php?1630343-Parameter-Markers trying to test a SQL and gets the error shown following this text. What is it trying to tell me? My SQL looks something like this: SQL: Select column1......column18 FROM C_HDR_TB H LEFT OUTER JOIN C_HDR_PYR_TB P ON H.C_TCN_NUM = P.C_TCN_NUM , C_HDR_TB H1 LEFT OUTER JOIN C_HDR_WARRANT_TB W db2 sql ON H1.C_HDR_RA_NUM = W.C_HDR_RA_NUM WHERE H.C_TCN_NUM = ? AND H.C_TCN_NUM = P.C_TCN_NUM AND P.C_SEQ_NUM = ? AND P.C_SEQ_NUM = :WK-010-NUM-1 ERROR: DSNT408I SQLCODE = -313, ERROR: THE NUMBER OF HOST VARIABLES SPECIFIED IS NOTEQUAL TO THE NUMBER OF PARAMETER MARKERS DSNT418I SQLSTATE = 07001 SQLSTATE RETURN CODE DSNT415I SQLERRP = DSNXRIVB SQL PROCEDURE DETECTING ERROR DSNT416I SQLERRD = -100 0 0 -1 0 db2 sql error 0 SQL DIAGNOSTIC INFORMATION DSNT416I SQLERRD = X'FFFFFF9C' X'00000000' X'00000000' X'FFFFFFFF' X'00000000' X'00000000' SQL DIAGNOSTIC INFORMATION ---------+---------+---------+---------+---------+---------+---------+------ Get your FREE download of MSN Explorer at http://explorer.msn.com Terry Purcell Re: SQL code -313 April 2, 2001 06:54 PM (in response to Carlton Enuda) Carlton, Since the error message suggests that the EXECUTE are OPEN have an incorrect number of parameter markers, and you haven't mentioned these, then I'll tell what looks wrong with the SQL you have supplied. Between the first ON clause and the next LEFT OUTER JOIN is a comma and table name which should not be there. So the FROM and ON clauses should be: FROM C_HDR_TB H LEFT OUTER JOIN C_HDR_PYR_TB P ON H.C_TCN_NUM = P.C_TCN_NUM LEFT OUTER JOIN C_HDR_WARRANT_TB W ON H1.C_HDR_RA_NUM = W.C_HDR_RA_NUM Regards Terry Purcell Yevich Lawson & Assoc www.ylassoc.com -----Original Message----- From: DB2 Data Base Discussion List [mailto:[login to unmask email]On Behalf Of Carlton Enuda Sent: Monday, April 02, 2001 6:00 PM To: [login to unmask email] Subject: SQL code -313 Hi everyone, I'm trying to test a SQL and gets the error shown following this text. What is it trying to tell me? My SQL looks something like this: SQL: Select column1......c
the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 11 of 11 Thread: Parameter Markers Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 05-15-08,10:21 #1 sampathgowri View Profile View Forum Posts Registered User Join Date Oct 2003 Posts 51 Unanswered: Parameter Markers The following stmt gives an error. Select fieldname1, fieldname2, fieldname3 from table where fieldname1 = ? The error was, The number of host variables in the EXECUTE or OPEN statement is not equal to the number of values required. SQLSTATE=07001 SQL0313N The number of host variables in the EXECUTE or OPEN statement is not equal to the number of values required. Explanation: The number of host variables specified in the EXECUTE or OPEN statement does not equal the number of host variables required for the parameter markers (?) appearing in the SQL statement. User Response: Correct the application program so the number of host variables specified in the EXECUTE or OPEN statement is correct for the parameter markers in the SQL statement. sqlcode : -313 sqlstate : 07001, 07004 Can anybody point what's the error in the stmt. Thanks. sampath gowri Reply With Quote 05-15-08,11:21 #2 ARWinner View Profile View Forum Posts Registered User Join Date Jan 2003 Posts 4,286 Provided Answers: 5 Please supply the DB2 version, fixpack level, and OS. How are you trying to execute this. There needs to be more code involved. Just executing a select statement with a ? is not valid. Please supply us with all the pertinent information. Andy Reply With Quote 05-15-08,11:28 #3 sampathgowri View Profile View Forum Posts Registered User Join Date Oct 2003 Posts 51 I am very new to DB2. I used Command Editor to type the select stmt and clicked the Execute button to execute this stmt. I currently use Db2 v8. I donno the fixpack level. This is how I used command editor. Start->Programs->IBM DB2->Command Line tools->Command Editor. sampath gowri Reply With Quote 05-15-08,11:35 #4 ARWinner View Profile View Forum Posts Registered User Join Date Jan 2003 Posts 4,286 Provided Answers: 5 You can generate an access plan on that query from the Command Editor, but you cannot execute the selec