string - Concatenate Numbers in sqlite as text with a - -


i trying concatenate numbers text, dash (-) between numbers concatenating.

i have figured out how concatenate numbers text:

cast(variable1 varcahr) || cast(variable2 varchar) 

i dash between these, i.e.

cast(variable1 varcahr) || cast(- varchar) || cast(variable2 varchar) 

but gives me invalid sql error. think might have dash not being in unicode or something, not sure. thank help.

just concat literal string (also don't need casts):

variable1 || '-' || variable2 

Comments