Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Regarding Month Field

Hi All,

i have loaded data from Oracle Database as follows

SELECT

D_NR,

REGION,

REGION_DESC,

CNTRY_NM,

SUB_REGION_CD,

SUB_REGION_DESC,

W_L_PROB,

W_L_STAT_CD,

BEG_DT,

year(BEG_DT) as year,

month(BEG_DT) as month,

END_DT

FROM DEAL_DN where year(BEG_DT)='2013';


My problem is it's loading months as 1,2,3,4,5,6,7,8,9,10,11,12,  But i want to load as Jan, Feb, Mar...........

i used   "date(BEG_DT,'MMM') as Month",   "Month( Date#( Month,'MMM') ) as Month " also but i got error

and While creating Quarter field using " 'Q' & Ceil(Month("ORDER_BGN_DT")/3) as Quarter " i'm getting error and RELOAD is failed. I attached the error Screenshots also.

Please can anyone look into this issue and give me solution.


Thanks,

MV Reddy

5 Replies
tresesco
MVP
MVP

You can't use qv functions under SQL command. You have to load the data into qlikview and then you can use qv functions like:

Load

year(BEG_DT) as year,

month(BEG_DT) as month ;

SQL Select * from <>;

kangaroomac
Partner - Creator II
Partner - Creator II

Hiya,

For the month, try:

Month(Date(BEG_DT, 'DD/MM/YYYY'))

Change the DD/MM/YYYY to whatever your date format is.

Hope this helps.

Not applicable
Author

Hi Tresesco,

Thanks for your Reply, i did it using  "to_char("BEG_DT", 'mon') as Month".

But Order of months is like apr,aug,dec,feb,jul,jun.....

But i want like jan, feb, mar, apr, may, jun.........dec as below screen

Please give me some idea on this?

Capture.PNG.png

Thanks,

Vamsi.

Not applicable
Author

Hi All,


i did it using  "to_char("BEG_DT", 'mon') as Month".

But Order of months is like apr,aug,dec,feb,jul,jun.....

But i want like jan, feb, mar, apr, may, jun.........dec as below screen

Please give me some idea on this?

Capture.PNG.png

Thanks,

Vamsi.

tresesco
MVP
MVP

Hi Vamsi,

That means it is being treated as text. Better you convert this text to date format during load. Try like this:

Load  Date#(Month,'MMM') as Month