Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Adding an Apostrophe to a field

$
0
0

I need to add an apostrophe to a field to display in a query. I have a ClientName field and a static value "Order" that I need to concatenate together. For example, if the ClientName is Ben Johnson, I need it to display as "Ben Johnson's Order". I've tried the below

ClientName + 's '' Order' AS ClientOrder

This does the apostrophe but it places it after the "S". Every attempt I try to get it before the "S" throws me an error. Any assistance would be appreciated.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>