Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Allow a user to change the WHERE clause via a form before script runs

Status
Not open for further replies.

buttersoft

Programmer
Jun 11, 2000
75
CH
Does anyone know how to present a user with a form, which asks them to complete their choices to search for, and then this input is entered into the WHERE clause of the script and the script runs.

I have a script that looks for 3 to 4 letter codes in a file with several thousand such codes. The user could decide he wants to report on ARM PON XAR for example, and thus the WHERE clause would have to be modified to
WHERE (EPIC = 'ARM OR EPIC = 'PON' OR EPIC = 'XAR), so what I want to do is present a form asking for a list perhaps seperated by a TAB or comma of EPICS, and then this has to overwrite the WHERE clause that is presently in the SQL script.

Anyone know how to do this?
 
Um, what tool are you using? SQL*Plus has a prompt command, for example, that will allow you substitute whatever the result of the prompt is into the sql command. Other report generators have similar features, and you can custom-build a true form and then have the form call your reporting tool. I need more info on what you're going to use....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top