Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
QSense
Creator II
Creator II

Script error with date field

Hello,

I have a script like below

:

SELECT /*+ parallel(8)*/

--              TRUNC (TO_DATE (TIMESTAMP, 'YYYY-MM-DD HH24:MI:SS')) TARIH,

--               SUBSTR (TIMESTAMP, 1, 4) AS YIL,

--               SUBSTR (TIMESTAMP, 6, 2) AS AY,

--               SUBSTR (TIMESTAMP, 9, 2) AS GUN,

--               SUBSTR (TIMESTAMP, 12, 2) AS SAAT,

--               SUBSTR (TIMESTAMP, 15, 2) AS DAKIKA,

               REPLACE (REPLACE (UPPER (DOCUMENT), 'E:\DOCUMENTS\'),

                        '.QVW')

                  DOCUMENT,

               TYPE,

               USERS

          FROM LOGS A

In this script When I comment date fields it works fine. But the whole script does not work. It gets QVX_UNEXPECTED_END_OF_DATA

error.

TIMESTAMP field is varchar data type and its format 'YYYY-MM-DD HH24:MI:SS .I change into date field.

a few times ago whole script was working.

İs there any one who has thougt about this problem ?

Thanks

7 Replies
fkeuroglian
Partner - Master
Partner - Master

Hi, can you put the qvw document as an example, to be easier to help yo to us?

this is only the select statement? the load statement where is?

thank you

Fernando

QSense
Creator II
Creator II
Author

Hi,

I can not put it in here since data belongs to company.

There is no qvd file.It gets directly from sql select statements.

Thanks

fkeuroglian
Partner - Master
Partner - Master

QSense
Creator II
Creator II
Author

whole script works in oracle .

Not applicable

Hi,

First load the date field from your data source and then  use the date time function to extact the values for Year, month, day and time  by using the Resident load.

Ex:

DirectRead:

Load Date#(TO_DATE, 'YYYY-DD-MM hh:mm:ss') AS TO_DATE;

Select TO_DATE from LOGS;

Resident Load:

Load Year(TO_DATE) AS YIL,

MONTH(TO_DATE) AS AY,

DAY(TO_DATE) AS GUN,

Hour(TO_DATE) AS SAAT,

Minute(TO_DATE) AS DAKKIKA

RESIDENT DirectRead;

maxgro
MVP
MVP

There are some post in the community with a similar problem (QVX_UNEXPECTED_END_OF_DATA), without answer, so I would start from this sql,  no hint, no oracle function, just the fields 

SELECT

     TIMESTAMP,

         DOCUMENT,

               TYPE,

               USERS

          FROM LOGS A

;

ant if it works, add the function at the qlikview side (see also Venugopal suggestion)

LOAD

     ......

     ......

     ;

SELECT

     TIMESTAMP,

         DOCUMENT,

               TYPE,

               USERS

          FROM LOGS A

;