SCALAR function in NODBC

Hello guys,

I’m heavily trying to create a select statement which provides three columns - but it does not work - and I do not need how to get it to work:

SELECT Code, Name, Code + ’ - ’ + Name AS DisplayValue
FROM “Dimension_Value”
WHERE (“Dimension Code” = ‘KOSTENSTELLE’)

this one fails with a type mismatch (Code + Code works, Text + Text works, Code + Text doesn’t).

So I’m trying to make a “CAST” or “CONVERT” instead:

SELECT Code, Name, CONVERT(varchar(10), Code) + ’ - ’ + Name AS DisplayValue
FROM Dimensionswert
WHERE (Dimensionscode = ‘KOSTENSTELLE’)

This one fails as well - apparently the CONVERT syntax is wrong.

Please help !