Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
your problem or error is in sql , not in qlikview
see this example
Date Functions in SQL Server and MySQL
Date Functions in SQL Server and MySQL
http://www.sql-server-helper.com/tips/date-formats.aspx
Good luck
Fernando
whole script works in oracle .
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;
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
;