Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> extra SQL in stored procedure?

extra SQL in stored procedure?

From: <newguysanfran_at_my-deja.com>
Date: Tue, 21 Nov 2000 22:25:42 GMT
Message-ID: <8vesos$alo$1@nnrp1.deja.com>

hello,

   I am connecting to an Oracle 8.1.5 db on Ultrix through ASP. I have built up a SQL statement and am firing it off against the database. This works but performance is poor. I wanted to use a stored procedure. The problem is that in my form I allow the used to select several criterion on which to filter and they build up a string as such: AND spbldinf_code IN ('1498','9407') AND pmwostatus_code = 'Active/Recharge' and a.its_current_date >= to_date
('8/21/2000','mm/dd/yy') and a.its_current_date <= to_date
('11/21/2000','mm/dd/yy')

Which I append to my SELECT statement, but when I create my stored procedure I can't seem to pass in the extra SQL as a parameter. I wanted to know if this is possible. My procedure keeps compiling with errors and I don't know how to fix it.

CREATE PROCEDURE getWorkOrder (sCurrWORest IN VARCHAR2(100)) AS

   BEGIN

      SELECT a.pmwrkord_code, a.description
      FROM pmwrkord a
      WHERE a.pmwrkord_code IS NOT NULL sCurrWORest
  END; Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Nov 21 2000 - 16:25:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US