Solved

Concatenating fields in SQL statement

Posted on 2007-11-16
2
452 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

635 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