Filter DateTime field using SQL
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am trying to extract some data from one of the data sources. Because of its size, I want to extract only the data after 2017-01-01. My problem is that, its a DateTime field and I have no idea how to specify it in the SQL. I would really appreciate some help with this.
All data before any filters
my sql, which didnt work
Error: Input Data (6): DataWrapOCI: Unable to prepare the query: "select CATREPORT.PPAP.CREATED_DATE
from CATREPORT.PPAP
where CATREPORT.PPAP.CREATED_DATE >= '2017-01-01 00:00:00'" Error: ORA-01861: literal does not match format string
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I believe it's because Oracles default date format is not set to the ISO 8601 standard (what Alteryx uses). Take a look at the link below which may help to understand what's going on and how to work around it.
https://www.oracletutorial.com/oracle-basics/oracle-date/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@jrgo Thank you for your link! TO_DATE made a trick. Hopefully it will save someone else's life as well 😉
