i can't get this to work:
select cast([Name] + ' ' + cast(NoGuests as int) - 1) as varchar(50))
From GuestList
i am trying to subtract 1 from the NoGuests and then cast the whole thing as a varchar.
Msg 1035, Level 15, State 10, Line 1
Incorrect syntax near 'cast', expected 'AS'.
Start Free Trial