【问题标题】:Date Format syntax in where clause in TeradataTeradata 中 where 子句中的日期格式语法
【发布时间】:2022-12-04 11:56:19
【问题描述】:

I have a table with date column in which date is updated in this format - 11/21/2022.

How can I get the results for the last 15 days using this date column in Teradata? Looks like need to change the date format in where clause.

I was using below query which does not work with this format

select * from table_A WHERE date BETWEEN (CURRENT_DATE - INTERVAL \'30\' DAY) AND CURRENT_DATE

This does not give any results.

    标签: sql teradata where-clause date-format sql-date-functions


    【解决方案1】:
    猜你喜欢
    • 2017-04-01
    • 2016-09-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-18
    • 2018-07-04
    • 2019-09-26
    • 1970-01-01
    相关资源
    最近更新 更多