|
I'm trying to create a SELECT SQL Stored Procedure callable from some .ASP code on a Windoz server. The .ASP application needs to SELECT specific rows of data based on parms they put into variables on the CALL statement. I have no problem doing INSERT statements from other .ASP applications, but can't seem to find the correct syntax for doing a simple SELECT. According to Operations Navigator's Stored Procedure SQL SELECT template it indicates the syntax should be: SELECT COLUMN1, COLUMN8 INTO :variable1, :variable2 from QGPL.TABLE1 WHERE COLUMN1 LIKE 'FILE%'; I entered this: SELECT UTCSID, UTLCID, UTSVC, UTSSTS INTO SELUTCSID, SELUTLCID, SELUTSVC, SELUSSSTS FROM DODOM1.BFUT220AP WHERE (UTCSID = SELUTCSID AND UTLCID = SELUTLCID AND UTSVC = SELUTSVC) If I put in the : in front of my parms after the INTO they are rejected as being bad tokens. If I take them out and the statement runs, it returns nothing. I'm testing this via ISQL from a command line using a CALL and supplying the parm values since I'm not the programmer for the .ASP code and don't have any access. I've also looked in the book DB2 Universal Database for iSeries SQL Programming Concepts in the section about CREATE PROCEDURE, etc. and don't find much about doing plain SELECTs Help would be appreciated from those that know. Thanks, Dave Odom
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.