Můžete vložit CASE
výraz do dotazu a nahraďte STR
s CAST
, takto:
SELECT
CASE WHEN position < 0 THEN '' ELSE CAST(column1 as VARCHAR(10)) END as position
, column2
FROM myTable
Můžete vložit CASE
výraz do dotazu a nahraďte STR
s CAST
, takto:
SELECT
CASE WHEN position < 0 THEN '' ELSE CAST(column1 as VARCHAR(10)) END as position
, column2
FROM myTable