Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

beachman14
New Contributor

Using the MonthEnd function in a script

I can use the MonthEnd function just fine as a calculated dimension, but when I try to use it in a script I get an error that says the function is undefined. Here is the code in the script that is getting the error:

SQL SELECT *,

MonthEnd([Payment Date]) AS PymtMth

FROM tblPayments;

The script connects to an Access database in which there is a table called tblPayments containing a field called Payment Date. Any help would be appreciated.

1 Solution

Accepted Solutions

Re: Using the MonthEnd function in a script

it should work as per sunindia reply (preceding load)

only remove , after SELECT *


LOAD *,

          MonthEnd([Payment Date]) AS PymtMth;

SQL SELECT *

FROM tblPayments;

4 Replies

Re: Using the MonthEnd function in a script

Try this:

LOAD *,

          MonthEnd([Payment Date]) AS PymtMth;

SQL SELECT *

FROM tblPayments;

The reason might be because the SQL may not have MonthEnd (not an expert in SQL, so don't really know). but QlikView has it so you can use it in the preceding load.

HTH

Best,

Sunny

Re: Using the MonthEnd function in a script

it should work as per sunindia reply (preceding load)

only remove , after SELECT *


LOAD *,

          MonthEnd([Payment Date]) AS PymtMth;

SQL SELECT *

FROM tblPayments;

Re: Using the MonthEnd function in a script

Good eye, thanks for catching that, I made the update .

beachman14
New Contributor

Re: Using the MonthEnd function in a script

That did it! Thanks very much.

Community Browser