Solved

Concatenating fields in SQL statement

Posted on 2007-11-16
2
447 Views
Last Modified: 2013-11-26
I have the following statement in Visual Studio 2005 which is connected to SQL Server 2005.  It complies without erros but displays the field FullName as Null.  There is data.  If I display the fields individually they show.  What am I missing?
Thanks
SELECT     LastName + ', ' + FirstName + ' ' + MiddleName + ' ' + FileNo AS FullName
FROM         dbo.tblClientInfo
0
Comment
Question by:BobRosas
2 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 125 total points
ID: 20299860
SELECT     ISNULLILastName+ ', ' ,'')+ ISNULL(FirstName + ' ','') + ISNULL(MiddleName + ' ','') + FileNo AS FullName
FROM         dbo.tblClientInfo
0
 

Author Comment

by:BobRosas
ID: 20299883
That was it!!
Thank you so much!
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
need help in sql 4 65
Returning data in a different format 8 46
Near realtime alert if SQL Server services stop. 20 53
Using Aggregate Functions to Count 3 32
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now