473,499 Members | 1,614 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Concatenation of Two Strings

1 New Member
When i concate 2 string, if last string value is null than concatination string also null.
Eg. Select fname +' '+ lname as [name] from employe.
If 'lname' is null and 'fname' is pooja,than i am getting null in name field ,please help
Feb 17 '12 #1
2 1812
Rabbit
12,516 Recognized Expert Moderator MVP
You can use the ISNULL function to change nulls into an empty string.
Expand|Select|Wrap|Line Numbers
  1. ISNULL(someField, '')
Feb 17 '12 #2
shv214
3 New Member
You can use ISNULL(), NVL(), IFNULL() and COALESCE() Functions to set any default value like spaces if null is encountered
Apr 12 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
3616
by: Jonas Galvez | last post by:
Is it true that joining the string elements of a list is faster than concatenating them via the '+' operator? "".join() vs 'a'+'b'+'c' If so, can anyone explain why?
8
1406
by: OPQ | last post by:
Hi all, I'd happy to have you share some thougts about ultimate optimisations on those 2 topics: (1)- adding one caractere at the end of a string (may be long) (2)- in a dict mapping a key...
37
4652
by: Kevin C | last post by:
Quick Question: StringBuilder is obviously more efficient dealing with string concatenations than the old '+=' method... however, in dealing with relatively large string concatenations (ie,...
10
1463
by: Nick Z. | last post by:
I do some logging like so: Log.Error("The song was not found. Artist - " + artist + ", Title - " + title + "\n" + exception.ToString()); Now I know that building strings in that way is...
23
6205
by: Bonj | last post by:
what is the correct form of string concatenation in VB.NET, + or &? Both seem to work, but which is correct? I know it's + in C# and & in VB6, but which in VB.NET?
5
4918
by: kaming | last post by:
Dear all, I would like to ask is these any DB2 function that can concatenation strings and have grouping capability?? for example, Tables:T F1 F2
33
4633
by: genc_ymeri | last post by:
Hi over there, Propably this subject is discussed over and over several times. I did google it too but I was a little bit surprised what I read on internet when it comes 'when to use what'. Most...
52
3901
by: Paddy | last post by:
I was browsing the Voidspace blog item on "Flattening Lists", and followed up on the use of sum to do the flattening. A solution was: I would not have thought of using sum in this way. When...
34
2615
by: Larry Hastings | last post by:
This is such a long posting that I've broken it out into sections. Note that while developing this patch I discovered a Subtle Bug in CPython, which I have discussed in its own section below. ...
10
4397
by: =?Utf-8?B?RGFyYSBQ?= | last post by:
Can some one suggest me as why StringBuilder class is better than Strings? -- Never say, Give up
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7014
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3108
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
311
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.