ITCOOKBOOK.com

 Options

Current Time:
Thu Sep 09, 2010 10:35 am
View unanswered posts

Log in

Username:
Password:
Log me on automatically each visit

Topic Information

CFSelect Dropdownvalue Problem

 
Post new topic   Reply to topic    ITCOOKBOOK.com Forum Index -> ColdFusion MX7
View previous topic :: View next topic  
Author Message
CoachPrincess
Fresher


Joined: 02 Dec 2006
Posts: 12
Location: Bryan, TX

PostPosted: Sun Dec 03, 2006 10:32 pm    Post subject: CFSelect Dropdownvalue Problem Reply with quote

When the following code is run, if there are any blanks in the fields, none of the values appear in the drop down box.

Code:
<cfquery>
SELECT Customer_Number, Hospital_System_Name, Hospital_Name, Address1, City, State,
Customer_Number+' '+Hospital_System_Name+' '+Hospital_Name+' '+Address1+' '+City+' '+State+'' as dropdownvalue
FROM Customer
WHERE Customer.Agency_Name = '#Agency_Name#'
</cfquery>

<cfoutput><cfselect>
</cfselect></cfoutput>

What is wrong with my code?
Back to top
View user's profile Send private message
cindy
Member


Joined: 02 Dec 2006
Posts: 22

PostPosted: Sun Dec 03, 2006 10:33 pm    Post subject: Reply with quote

Are you sure the blanks aren't Nulls? NULL + anything else = NULL.

If you concatenate a NULL value with anything else, the result is NULL. This is an ANSI behavior. You have to use whatever function your DB has to replace NULLs with actual blank values.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ITCOOKBOOK.com Forum Index -> ColdFusion MX7 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Help US Help YOU

 

 

Please complete our short survey and save $17.50 on ITCOOKBOOK.COM.

 

 

Take a look at SAPTrends.com, a new blog dedicated to discussion of SAP Training trends in SAP ERP.

 

 

C# Interview Questions

 

.NET Interview Questions

 

Java Interview Questions

 

Python Interview Questions

 

ColdFusion Interview Questions

 

Linux Interview Questions

 

Linux LPIC 1 Certification Questions

 

Perl Programming Interview Questions