Posted: 3/26/2015 1:03:46 PM EDT
|
I'm running a SQL query, but want to add a character to the output.
I'm pulling SSN numbers and want the output to be the SSN with an "A" tagged to the end. Help a dude out? |
|
It really depends on the RDBMS you're querying, but I've used to following:
Oracle - using the double vertical pipe to concatenate SELECT SSN_NUM||'A' FROM <table> MS SQL SELECT SSN_NUM + 'A' from <table> Add on your WHERE clause, include additional fields, and go to town |
Win a FREE Membership!
Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!
You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.