+ New Ticket

Error (42S02)



  • Avatar
    George L'Heureux

    Hi Aradhna,

    When calling a stored procedure there are a couple of important things that you need to keep in mind.

    First, you need to make sure that you're providing enough information that the system can resolve the NAME of the stored procedure. In this case, the system is reporting that it can't find SP_LTS_PRESCRIPTION(). Check first to make sure that the name is spelled correctly. Second, check to make sure that the Database and Schema in which the Stored Procedure is located is either specified in your SQL, or is what your active database is. For example, if your stored procedure is in database ARADHNAS_DB, you would probably need your SQL to read ARADHNAS_DB.SP_LTS_PRESCRIPTION().

    The next important thing is the parameters. Your parameter list is visible in the database explorer, in the stored procedure definition. Your inputs to these parameters must match in datatype and in order to the prameter list for the stored procedure. If your stored procedure takes parameters of type INTEGER and you pass it a VARCHAR(255), it will not work.

    Much more is available, as well, on IBM's support page for stored procedure development: https://www.ibm.com/support/knowledgecenter/en/SSULQD_7.2.1/com.ibm.nz.sproc.doc/c_sproc_plg_overview.html


    Comment actions Permalink
  • Avatar
    Aradhna Jugath

    Hi George


    Your assistance has been invaluable.


    Thank you so much for the detailed response.  I will align according to your guidance.


    Thank you also for sharing additional resources - will definitely keep it close at hand.


    Kind regards


    Comment actions Permalink

Please sign in to leave a comment.