Home » SQL & PL/SQL » SQL & PL/SQL » user paramter @
user paramter @ [message #363250] Fri, 05 December 2008 09:41 Go to next message
avrillavinge
Messages: 98
Registered: July 2007
Member

Hi,
i m using the below case statement


CASE
WHEN tablename.columnname = '1' THEN 'WV'
WHEN tablename.columnname = '2' THEN 'GA'
WHEN tablename.columnname = '3' THEN 'SC'
WHEN tablename.columnname = '4' THEN 'AL'
WHEN tablename.columnname = '5' THEN 'NC'
WHEN tablename.columnname = '6' THEN 'VA'
WHEN tablename.columnname = '7' THEN 'FL'
WHEN tablename.columnname = '8' THEN 'TN'
WHEN tablename.columnname = '9' THEN 'KY'
ELSE "
END

It is working properly and it is prompting the user to choose one of the 'State' names in the list.

I need to add a 'Regional' to the list of prompts which is (2,3,4,5,6,7,8,9) everything EXCEPT 1.

When I add the following:
WHEN tablename.columnname IN ('2', '3', '4', '5', '6', '7', '8', '9')THEN 'REGIONAL'
in the line above ELSE ", it does not show up because on of the prior has already been true.

If I add: WHEN tablename.columnname IN ('2', '3', '4', '5', '6', '7', '8', '9') THEN 'REGIONAL' in the second line of the CASE, then ONLY 'WV' and 'Regional' show up in the prompt and I need ALL to show up PLUS the 'Regional'

Is there a way to add this 'Regional' user paramter in one single case?

Re: user paramter @ [message #363253 is a reply to message #363250] Fri, 05 December 2008 09:50 Go to previous messageGo to next message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Is this a PL/SQL or a Forms question?

Regards
Michel
Re: user paramter @ [message #363254 is a reply to message #363250] Fri, 05 December 2008 09:52 Go to previous messageGo to next message
avrillavinge
Messages: 98
Registered: July 2007
Member
ORACLE 9I SQL .

We are creating this @ parameter so that user can enter value using the case statement.

Re: user paramter @ [message #363265 is a reply to message #363254] Fri, 05 December 2008 10:40 Go to previous message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
PL/SQL executes on server and does not interact with user.

Regards
Michel
Previous Topic: temporary table
Next Topic: How to combine 2 fields from 1 table and insert it into another table?
Goto Forum:
  


Current Time: Fri Dec 02 22:53:37 CST 2016

Total time taken to generate the page: 0.04658 seconds