Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Team,

SQL
-----------------heere we want Updated By Name

select  c.ID as CUSTOMERLOANDATAID,c.FIRSTNAME,c.LASTNAME,
 isnull(UU.FIRSTNAME + ' '+ UU.LASTNAME,'') as  UpdatedByName
 from CUSTOMERLOANDATA c with(nolock)
Left Outer join USERMASTER UU (nolock) on UU.ID = C.UpdatedBy
where FILELOGID=(select top(1) filelogid  from CUSTOMERLOANDATA with(nolock) where
 QCUSERID = 13
ORDER BY FILELOGID)
and
 QCUSERID = 13
 ORDER BY FILELOGID, RECORDNO


what does isnull(UU.FIRSTNAME + ' '+ UU.LASTNAME,'') it mean ???

please let me know ..

Thanks
Harshal
Posted
Comments
Vedat Ozan Oner 3-Mar-14 2:28am    
search google with 'how to solve isnull () in SQL'
s#@!k 3-Mar-14 2:30am    
it means if the UU.FIRSTNAME + ' '+ UU.LASTNAME value is null isnull return '' value means empty.
google for the difference between dbnull=NULL and ''.
R Harshal 3-Mar-14 2:37am    
Thanks for u r reply.

read this link to clear your problem

http://technet.microsoft.com/en-us/library/ms184325.aspx[^]
 
Share this answer
 
Assume the Column value is null
SQL
select (columname,0)Amount from table

then the result is
SQL
Amount
null


but if you using isnull function
SQL
select isnull(columname,0)Amount from table

SQL
Amount
0
 
Share this answer
 
Comments
R Harshal 3-Mar-14 5:21am    
Thank u for the answer...
King Fisher 3-Mar-14 5:35am    
welcome :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900