SQL Query
- 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
Hi, I'm using In dB tools tp pull the data. I just need to filter on data greater than current date.
I've used this function 'Field_name'>= getdate();
But I'm receiving error has Getdate() is invalid function
Solved! Go to Solution.
- Labels:
- Database Connection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @Ronal_bal,
Does 'Field_name'>= CURRENT_DATE work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yes, that's working. can I know why get data isn't working. Can you guess any reasons?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Ronal_bal Im not a SQL expert but perhaps the version your using or your data base environment doesn't support get data? Do you know what SQL version your using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I'm trying to pull greater than last week Monday's date based on current system date.
I tried
DATETIME = DATEDIFF(day, 0, GETDATE() – DATEDIFF(day, 0, GETDATE()) %7)
receiving some configuration error. I tried to replace GETDATE() with Current_date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
what type of database are you running?There can be a good amount of deviation in SQL date function nomenclature.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It is hive db.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Ronal_balYou need to use the correct syntax for HIVE. This isn't an Alteryx issue - see this post for an example of how to use DateTime in HIVE and adjust for your need...
https://www.revisitclass.com/hadoop/how-to-get-the-current-date-in-hive-with-examples/
