Avatar of Star Gazr1
Star Gazr1
Flag for United States of America

asked on 

T SQL Select a Constant Value and Concatenate with another Field

I am using a proprietary front end application to connect to a SQL Server database.
I want to pad a field with a constant string, by using the code below it works with one minor issue * see below:

SELECT (VAL("123456")+Customer.CustomerID FROM Customer

The return value inserts commas every third character:
123,456,555,555,555,555

I tried a few different changes to the syntax but still getting the same results.   The application I use to connect to the SQL Server Database isn't easy to work with - so it is quite a challenge.  Thanks for any info.
Microsoft SQL ServerSQL

Avatar of undefined
Last Comment
Star Gazr1

8/22/2022 - Mon