Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
Please help me with store qvd file.
I load 1 file, then
CONCATENATE
LOAD DISTINCT * FROM $(vQVD)\NEWFILE.qvd (QVD) ;
where date(submitDateTime)>=date('$(dDate)'); -cut 6 months
I need to store them in 1 file.
STORE MYFILE INTO $(vQVD)\NEWFILE.qvd (QVD);
Other words, I replace old MYFILE to a new. (6 last months + current month)
Thank you,
I found out solution
CONCATENATE
LOAD DISTINCT * FROM $(vQVD)\1.qvd (QVD)
WHERE NOT EXISTS (ID) AND date(submitDateTime)>=date('$(dDate)')
Hi,
Not able to understand...can you throw a sample or elaborate your problem..
Are you trying to load a QVD file and append the new data to it and save it back to its original name?
Regards,
Phani
Hi,
I load the same data only last month. Then concatenate data previous months. I need to store all data in 1 file. (current month + previous months).
Thanks,
What's the problem exactly??
You don't know how to save the files correctly?
If you want the data to be added to you're file just load the data, concatenate or join the data and then save.
Don't see problems here ...
rgrds,
Anita
Yes, I concatenate the file. But when I add my stored file next month, I loose January. I have December, then February, because I didn't store it right.
regards,
here is a code sample how we did something like that:
SessionTerminalConfiguration:
LOAD @1 as SessionTerminalConfiguration.SessionID
,@2 as SessionTerminalConfiguration.Application
,timestamp(timestamp#(@3,'YYYY-MM-DD-hh.mm.ss.ffffff')) as SessionTerminalConfiguration.StartDateTime
,timestamp(timestamp#(@4,'YYYY-MM-DD-hh.mm.ss.ffffff')) as SessionTerminalConfiguration.EndDateTime
FROM $(vDirectory)\SessionTermConfiguration_*_*.csv (txt, codepage is 1252, no labels, delimiter is ',', msq);
JOIN (SessionTerminalConfiguration)
LOAD SessionTerminalConfiguration.SessionID
,SessionTerminalConfiguration.Application
,SessionTerminalConfiguration.StartDateTime
,SessionTerminalConfiguration.EndDateTime
FROM $(vDirectory)\SessionTerminalConfiguration.qvd (qvd);
STORE SessionTerminalConfiguration INTO $(vDirectory)\SessionTerminalConfiguration.qvd;
It's my :
Tempo:
LOAD
Year(submitDateTime) as Year,
Month(submitDateTime) as Month,
Week(submitDateTime)& '-' & year(submitDateTime) as Week,
'Q' & Ceil(Month(submitDateTime)/3)& '-' & year(submitDateTime) as Quarter,
MonthName(Monthstart(submitDateTime)) as MYear, // MMM YYYY
QuarterName(QuarterStart(submitDateTime)) as QYYYY,*;
MyFILE:
SELECT * FROM dbo._749;
****
CONCATENATE
LOAD DISTINCT * FROM $(vQVD)\NEWFILE.qvd (QVD)
where date(submitDateTime)>=date('$(dDate)');
STORE MyFILE INTO $(vQVD)\NEWFILE.qvd (QVD);
Other words, I want to replace old file to a new. When I load it in February, I missed January data, because it didn't store in January.
Thanks,
Can't see you loading the 'old' file ... is this the dbo_.749 ??
If you miss January data you just didn't correctly joined the tables.
Did you try the JOIN functionality instead of the CONCATENATE functionality??
Maybe this does the trick for you.
rgrds Anita
thank you so much for your help, I did the same in January, it was Ok. I did the same today, looks Ok. I'll see in next month.
Thank you,
Do you know how to load data without duplicate( I load Feb data and add file which has Feb data)?
CONCATENATE
LOAD DISTINCT * FROM $(vQVD)\NEWFILE.qvd (QVD)
where date(submitDateTime)>=date('$(dDate)');