Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Concatenating fields in SQL statement

Posted on 2007-11-16
2
Medium Priority
?
454 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 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

715 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