Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
See below is my script i run to split my history data to qvd's. But when i try to store the table to a qvd it gives an error that the table is not found. What am i missing as this exact same script runs fine with some of my other data?
Thanks in advance.
Let INI = now();
sub create_qvd_Monthly(t,q)
if (q = '') then
q = t
end if
let n = NoOfRows('$(t)');
let h = now();
Tables:
Load
'$(t)' as Table,
'$(q)'&'.qvd' as [Archived QVD],
'$(n)' as [RecordCount],
'$(h)' as [Datestamp]
autogenerate(1);
Store $(t) into D:\QlikView\QVData\QVD\MONTHLY_QVDs\$(q).qvd;
drop table $(t);
end sub
SQL Connection
[CELLC_RECHARGE_SQL_EXTRACT_MONTHLY]:
SQL
SELECT [SEQ_NO]
,[FILE_NO]
,[MSISDN]
,[SHORT_ICCID]
,[FIRST_ACTIVITY_DATE]
,CONVERT(VARCHAR(10),[RECHARGE_DATE],20) as [RECHARGE_DATE]
,[VOUCHER_DESC]
,[RECHARGE_AMOUNT]
,[MANUF_ID]
,[DEBTOR_SFID]
,[SITE_SFID]
FROM [GFMSAC].[dbo].[S_DAILY_RECHARGE];
FOR year = 2016 to 2017
FOR month = 1 to 12
[CELLC_RECHARGE_MONTHLY]:
LOAD SEQ_NO,
FILE_NO,
MSISDN,
SHORT_ICCID,
FIRST_ACTIVITY_DATE,
RECHARGE_DATE,
VOUCHER_DESC,
RECHARGE_AMOUNT,
MANUF_ID,
DEBTOR_SFID,
SITE_SFID
resident CELLC_RECHARGE_SQL_EXTRACT_MONTHLY
where Year(RECHARGE_DATE) = $(year) and Month(RECHARGE_DATE) = $(month);
call create_qvd_Monthly ('CELLC_RECHARGE_MONTHLY','CELLC_RECHARGE_SQL_EXTRACT_$(year)-$(month)');
NEXT
NEXT
DROP Table CELLC_RECHARGE_SQL_EXTRACT_MONTHLY;
See below error.
Table not found error
Table 'CELLC_RECHARGE_MONTHLY' not found
Store CELLC_RECHARGE_MONTHLY into D:\QlikView\QVData\QVD\MONTHLY_QVDs\CELLC_RECHARGE_SQL_EXTRACT_2016-1.qvd
Add noconcatenate to the table below
[CELLC_RECHARGE_MONTHLY]:
Noconcatenate
LOAD SEQ_NO, ......
Do with Square Bracket
Store [CELLC_RECHARGE_MONTHLY] into D:\QlikView\QVData\QVD\MONTHLY_QVDs\CELLC_RECHARGE_SQL_EXTRACT_2016-1.qvd
Nope still the same problem.
Add noconcatenate to the table below
[CELLC_RECHARGE_MONTHLY]:
Noconcatenate
LOAD SEQ_NO, ......
Success thanks a million. Still don't know why some of my other tables runs fine without the Noconcatenate.