Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> extra SQL in stored procedure?
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 sCurrWORestEND; Sent via Deja.com http://www.deja.com/
![]() |
![]() |