Cast erroring

  • I'm new to development below script is erroring any idea why?

    select cast(right(@@servicename,2) as int)

    Thanks in advance

  • if you do SELECT RIGHT(@@SERVICENAME,2) what do you get?

    typically in a default instance it will be ER, so trying to put characters into a number wont work.

  • thanks!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply