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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFSELECT and display two columns in the drop down

Status
Not open for further replies.

Lesio

MIS
Jan 7, 2003
48
US
How can I display two columns in a drop down,
like:

<CFQUERY name = "getpersoninfo" ... >
select person_id, last_name, first_name from person
</CFQUERY>

<CFSELECT .. query = "getpersoninfo" value = "person_id" display = "last_name, first_name">
 
I think you can only use one column. try modifying your query a little bit.

<CFQUERY name = "getpersoninfo" ... >
select
person_id,
last_name + ", " + first_name as fullName
from person
</CFQUERY>

<CFSELECT .. query = "getpersoninfo" value = "person_id" display = "fullname">

Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so.
-Douglas Adams (1952-2001)
 
Thanks a lot ! Is

last_name + ", " + first_name as fullName

a correct Oracle syntax ?
 
that i'm not sure. i think its || in oracle but i've never done it and don't have access to one to try. sorry.

Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so.
-Douglas Adams (1952-2001)
 
i googled and came up with this syntax.
You concatenate a column i.e. WHERE firstname || ' ' || lastname = 'JOHN JONES'

Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so.
-Douglas Adams (1952-2001)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top