try_cast
Hi support,
Please add TRY_CAST to you list of key words in SQL Prompt.
Best regards,
Henrik
Henrik Staun Poulsen
Vestas Data Center
Vestas Technology R&D
1
vote
![](https://secure.gravatar.com/avatar/6ca093a5e986f38e8aba64fec2fa9398?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
Hi Henrik,
Unfortunately the script syntax highlighting is not handled by SQL Prompt. It’s something that’s built into SSMS and so we don’t have control over which keywords get marked as pink.
-
Henrik Staun Poulsen commented
hi Aaron,
Yes that is very unfortunate, as it is possible to get Redgate to fix things, but Microsoft...
I'm tired already.Best regards,
Henrik -
Henrik Staun Poulsen commented
hi Aaron,
yes, but it is written in Black, not pink like other functions, like Round()
try typing
SELECT TRY_CAST(GETDATE() AS DATETIME)
SELECT ROUND(1.5 ,0)
in SSMS