October 14, 2008 at 2:10 pm
I have 2 fields as CHAR(15) and CHAR(21) which represent an employee's first name and last name respectively (this is a Microsoft Dynamics Great Plains Database). I am trying to combine the two in a query so that I can export just a single column with the employee's full name.
SELECT FRSTNAME + ' ' + LASTNAME
FROM UPR00100
I realized that these fields must have been CHAR() when I viewed the result.
JON DOE
JOHN JOHNSON
BETHANY JOHNSON
...
Is there any way to change this such that there is only 1 space between the first and last name without altering the actual datatypes in the table?
Jared
Jared
CE - Microsoft
October 14, 2008 at 2:14 pm
Use the RTRIM function on the FIRSTNAME. LIke this
Select RTRIM(FirstName) + ' ' + LastName
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
October 14, 2008 at 3:08 pm
Perfect! Thanks much!
Jared
CE - Microsoft
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply