Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Adding description on lookup table (3 Merged) (apex)
Adding description on lookup table (3 Merged) [message #563888] Fri, 17 August 2012 12:49 Go to next message
sanjsingh
Messages: 1
Registered: August 2012
Junior Member
Ive got a look up table and i want it to display text on the table when viewing it instead of just the ID number, how would i do that? so for example if
1 = Hello
2 = Bye

it would display "Hello" instead of "1"
Re: Adding description on lookup table [message #563889 is a reply to message #563888] Fri, 17 August 2012 12:51 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/
Re: Adding description on lookup table (3 Merged) [message #563900 is a reply to message #563888] Fri, 17 August 2012 13:30 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Welcome to the forum.
Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.

- Select the text column instead of the id column.
- Join the look up table with the other one that gives you the id
- ...

With any SQL question, Post a working Test case: create table and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

Regards
Michel
Re: Adding description on lookup table (3 Merged) [message #563908 is a reply to message #563900] Fri, 17 August 2012 15:08 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As you said that it is the Apex question: where do you want to do that? Is it, perhaps, a list of values? If so, note that its query requires exactly 2 columns: a DISPLAY and a RETURN value. So, it might look like
select title v_disp, id v_ret from your_table

Otherwise & generally speaking, follow Michel's advice.
Previous Topic: misspelled column name
Next Topic: Tabular form highlighting all column instead of faulty entry cell
Goto Forum:
  


Current Time: Thu Dec 12 07:20:55 CST 2024