Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Month Year

Hello,

I have a date field in Oracle and transformed this.

TO_CHAR(datum,'mon') Month

then i select Month in select box.

Now i don't get the chronical order.

How can I fix this?

1 Solution

Accepted Solutions
chancekbarkley
Partner - Contributor III
Partner - Contributor III

Rather than extract the month int he SQL Select, use qlik script in the preceding load.  Month(datum) AS Month.

LOAD      Month(datum) AS Month

SQL       SELECT *

          FROM table

It should then sort correctly.

View solution in original post

5 Replies
MK_QSL
MVP
MVP

Keep datum in same format.. .Dont convert it.

Convert in QlikView

Month(datum) as Month

in script.

chancekbarkley
Partner - Contributor III
Partner - Contributor III

Rather than extract the month int he SQL Select, use qlik script in the preceding load.  Month(datum) AS Month.

LOAD      Month(datum) AS Month

SQL       SELECT *

          FROM table

It should then sort correctly.

Not applicable
Author

it doesn't work; i make connection to oracle database

i have select Month(dateintroduction) as Month from users

gives me a failure;

Not applicable
Author

i need also other columns in table

does i need to specify them in load

e.g

LOAD Month(datum) AS Month

SQL select datum, carslicense

FROM table

does this work?

MK_QSL
MVP
MVP

LOAD *, Month(datum) AS Month;

SQL select datum, carslicense FROM table