Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Can anybody please give me tips on a select statem

Author  Topic 

bmgtone
Starting Member

5 Posts

Posted - 2015-04-14 : 12:23:31
I need help on a select statement. In my database i am using the employee table. I need my first column to display your full name is 99 characters. so like if the employee is john smith it would display Your Full Name Is 9 characters (including the space) Any tips on this would be appreciated

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2015-04-14 : 12:25:35
SELECT 'Your full name is ' + CAST(LEN(FirstNameColumn) + LEN(LastNameColumn) AS VARCHAR(12)) + ' character(s).'



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page

bmgtone
Starting Member

5 Posts

Posted - 2015-04-14 : 13:18:32
Thankyou That is basically what i was looking for appreciate it
Go to Top of Page
   

- Advertisement -