If i enter this
= CAST(GETDATE() AS date)
as a filter on a date in the view designer, I get
Data type error in expression
BUT if i type it in the SQL script (of the same designer) it works OK
If i enter this
= CAST(GETDATE() AS date)
as a filter on a date in the view designer, I get
Data type error in expression
BUT if i type it in the SQL script (of the same designer) it works OK
Can confirm, I get the error, too.
One of many reasons why I never use the designers in SSMS.
Try this filter:
= { fn CURDATE() }
If I do a function I guess it would work BUT why it does not allow me I guess it's a bug which has been there for ages
Bug? Rather a limitation. As Olaf says, stay away from the View Designer. It's crippled, and this is only one token of that.
Hi EvanCamilleri-5895,
Welcome to Microsoft Q&A.
This issue happens to me. I’m not sure if it is a known issue or by design.
I recommend you submit a feedback to this link: https://github.com/MicrosoftDocs/sql-docs/issues
Your feedback is valuable for Microsoft to improve the level of products and service. Appreciate for your understanding.
Best Regards,
Amelia
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
18 people are following this question.