Link to home
Start Free TrialLog in
Avatar of Sara_j_11
Sara_j_11

asked on

teradata simple sql

how do I do the following in teradata:
select * from table
where ship_date between (1st day of previous month) and (last_day of previous month)
Avatar of Lowfatspread
Lowfatspread
Flag of United Kingdom of Great Britain and Northern Ireland image

try

select * from table
where month(ship_date) = Month(current date - 1 month)
 and year(ship_date) = Year(current date - 1 month)
ASKER CERTIFIED SOLUTION
Avatar of Lowfatspread
Lowfatspread
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sara_j_11
Sara_j_11

ASKER

does both of the above posts do the same thing? is there any disadvantage of using post 1?