[英]Redshift WHERE to find current month
TO_CHAR(order_placed_at_ltz,'YYYY-MM') = TO_CHAR(NOW(),'YYYY-MM')
it gives me this error:它给了我这个错误:
ERROR: Specified types or functions (one per INFO message) not supported on Redshift tables.错误:Redshift 表不支持指定的类型或函数(每个 INFO 消息一个)。
I want to get the orders placed for this month according to some queries that I made and I put the TO_CHAR
function in a WHERE condition.我想根据我所做的一些查询获取本月的订单,并将TO_CHAR
function 置于 WHERE 条件下。
According to Redshift documentation on date and time functions , it does not have a now()
function. Use getdate()
or current_date()
function instead.根据有关日期和时间函数的 Redshift 文档,它没有now()
function。请改用getdate()
或current_date()
function。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.