sql server 2008 - Concatenate two SQL fields with text -


how can concat 2 fields , text in between? i've tried of following , nothing has worked...

([fldcode1] || ':' ||[fldcode2]) method  ([fldcode1] + ':' + [fldcode2]) method  ([fldcode1] & ':' & [fldcode2]) method                                                 *** & cannot used varchar  

this should work

select [fldcode1] + ':' + [fldcode2] tab 

or if columns numeric

select cast([fldcode1] varchar(100)) + ':' + cast([fldcode2] varchar(100)) tab 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -