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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL STATEMENT

Re: SQL STATEMENT

From: Srinivas Chikka <SCHIKKA_at_worldnet.att.net>
Date: 27 Aug 1998 23:01:40 GMT
Message-ID: <6s4ogk$ri3@bgtnsc01.worldnet.att.net>


Try using Dynamic SQL ( using DBMS_SQL package)..

> I have a table of zip codes and a web form that attempts to query
>the table based on three fields on the form. The user can provide as
>little or as much information in these three fields as they would
>like. Problem: I do not know in advance which fields will be entered.
>How do I structure the select statement (cursor (Oracle)) so that
>fields not entered will not restrict the returned records but field
>which are entered will restrict the output. I've tried a number of
>approaches and some work well but not in every scenario. Since
>there are three fields then there are 8 possible ways inputs can be
>anticipated. I hope I haven't confused anyone. I used to do something
>in Access like this...
> ...where myfield = myinput or myfield is null;
>
Received on Thu Aug 27 1998 - 18:01:40 CDT

Original text of this message

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