Concatenating two columns together, Just want them to be displaying together in column with a space between the two numbers. It keeps adding the two numbers together. One is a bigint other is a smallint.Will be displayed in an SSRS report eventually but right now just using SQL to query the data
(NBR +''+ ACCT_NBR) as acct,
Though you didn't mention the database, try
MySQL
concat(NBR,' ',ACCT_NBR) as acct
SQL Server
CAST(NBR AS VARCHAR)+' '+CAST(ACCT_NBR AS VARCHAR) as acct
You don't mention what flavor of SQL you're using, but depending, you may need to convert the values to strings first. For SQLSever...
(Cast(NBR as varchar(20)) + ' ' + Cast(ACCT_NBR as varchar(20))) as acct,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With