Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Replace

I'm taking data for the last 45 days with a select function. I need to keep the data of the days before. For the first day i use the normal select. When i tried to use replace select it doesn't work. It only takes data for the day 45 (from today). What can cause this problem?

3 Replies
Not applicable

Replace

SQL:

SELECT [date]

FROM Table

WHERE [date] >= DATEADD(day, -45, CURRENT_TIMESTAMP);

Fetch all Values where date >= today - 45 days

http://msdn.microsoft.com/de-de/library/ms186819.aspx

Not applicable

Replace

I have a function like:

select * from function(day,other things)

I call it 45 times, choosing day as current date, current date -1,..., current date -45. The data for 46 days ago i still need it, but it is not changing anymore. The replace select is not working. 

sarathi87k
Contributor

Re: Replace

replace function is used only for string or character conversion..use convert for date conversion

like convert (char(12),getdate(),103)

just change the third parameter to change the date style..

Community Browser