Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Need help with user prompt
I am making some SQL code that I want to ask the user to input the first two
letters of a postcode, and it will then find the details of all the
addresses containing these two letters as the first two digits in the
postcode. I have adapted some code I got from Oracle.com and here it is:
PROMPT Enter the first two digits of your postcode
PROMPT For Example ME
ACCEPT ENUMBER NUMBER PROMPT 'Postcode. :'
SELECT SUPNAME, SUPADD
FROM SUP
WHERE SUPPCODE=&ENUMBER
a postcode contains 6 digits with a space in the middle, for example, ME6
7HQ. I want the user to type in say "ME" and get all the addresses that
start like this.
Also, I know that this code will only work with numbers, so any help on code that will actually do this using characters would be great.
Thanks Received on Wed Jan 01 2003 - 13:30:39 CST