Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Column names to a listbox (APEX 3.2)
Column names to a listbox [message #479072] Thu, 14 October 2010 08:56 Go to next message
Mattit
Messages: 3
Registered: October 2010
Location: Sidney, ne
Junior Member

Hey, folks. I'm trying to populate a listbox or dropdown with a list of column names from a given table.

I hunted around and found a quick query to get the result set I need. But no matter what I try whenever I use it (modified slightly) I get an error when I try to use it to populate a listbox.

Original query:
SELECT column_name FROM all_tab_cols where table_name ='SMT_INTERNAL';

Modified query:
SELECT column_name display_value, column_name return_value FROM all_tab_cols where table_name ='SMT_INTERNAL';

Help would be much appreciated.

Thanks,
-- Matt
Re: Column names to a listbox [message #479155 is a reply to message #479072] Thu, 14 October 2010 15:38 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
I get an error when I try to use it to populate a listbox.

It would, possibly, help if we knew which error it is.
Re: Column names to a listbox [message #479159 is a reply to message #479155] Thu, 14 October 2010 15:59 Go to previous messageGo to next message
Mattit
Messages: 3
Registered: October 2010
Location: Sidney, ne
Junior Member

The error I get during the build wizard:

LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
Re: Column names to a listbox [message #479191 is a reply to message #479159] Fri, 15 October 2010 01:31 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Try your modified query without semicolon (;) at last.

regards,
Delna

[EDITED by LF: disabled smilies in this message]

[Updated on: Fri, 15 October 2010 01:43] by Moderator

Report message to a moderator

Re: Column names to a listbox [message #479192 is a reply to message #479191] Fri, 15 October 2010 01:33 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Ohhh...

Semicolon ";" converted to smiley.

regards,
Delna
Re: Column names to a listbox [message #479238 is a reply to message #479192] Fri, 15 October 2010 08:23 Go to previous message
Mattit
Messages: 3
Registered: October 2010
Location: Sidney, ne
Junior Member

That worked! Thanks a ton.
Previous Topic: Trying to determine Excel import abilities
Next Topic: array in htf.anchor2
Goto Forum:
  


Current Time: Fri Mar 29 04:32:07 CDT 2024