SQL Reporting RTRIM and LTRIM

I have a field in a text box and that combines first and last name. If I didn't use TRIM there was too much space between the first and last name. Now when I add TRIM there is no space between first and last name.

How do I get a space between the first and last name?

here is my current syntax

=(TRIM(Fields!FRSTNAME.Value)+(Fields!LASTNAME.Value))

It prints on the report like this JOHNDOE I want it to show JOHN DOE
bkpierceAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Raja Jegan RConnect With a Mentor SQL Server DBA & ArchitectCommented:
Assign ' ' to some variable and then pass the variable here and try

=RTRIM(Fields!FRSTNAME.Value) & some_variable & RTRIM(Fields!LASTNAME.Value)
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
Try this:

=(RTRIM(Fields!FRSTNAME.Value)+ ' ' + RTRIM(Fields!LASTNAME.Value))
0
 
bkpierceAuthor Commented:
That gives me a syntax error.
SQL-RS.jpg
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 
Raja Jegan RSQL Server DBA & ArchitectCommented:
+ is concatenate operator in TSQL and gave it that by mistake..
Try this

=RTRIM(Fields!FRSTNAME.Value) & ' ' & RTRIM(Fields!LASTNAME.Value)
0
 
bkpierceAuthor Commented:
It's still giving me a syntax error
SQL-RS-2.jpg
0
 
planoczConnect With a Mentor Commented:
You have to use a Double Quote not single in your expression editer.
0
 
bkpierceAuthor Commented:
Double quote worked pefect. Thank You
0
All Courses

From novice to tech pro — start learning today.