You can translate the question and the replies:

Prior year last business day retrivel

Hi there, I am trying to retrive last business day of last year though this query select dateadd(yy,datediff(yy,-1,@date),-1)[In sql], but in denodo I am not able to find any solution here, so can you please help me out, Thanks,
20-08-2021 13:29:49 -0400

1 Answer

Hi, In such a situation where there exists a function in the Source that can perform the required operations, I would create a view in the Virtual DataPort server using the Source native query. That is, I would use the **[Create from Query](** option to create a base view that would use the function to display the desired output. I would provide the following query in the **Create Base view From SQL Query** dialog box and provide an interpolation variable (Eg : @date) for the date column so as to provide an input every time the view gets executed. ``` select dateadd(yy,datediff(yy,-1,'@date'),-1) as lastdayofyear ``` You can take a look at the Knowledge Base article [Using the Create Base View From Query Option]( for more information. Hope this helps!
Denodo Team
24-08-2021 03:11:16 -0400
You must sign in to add an answer. If you do not have an account, you can register here