Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

QVD Period

Hello, Im connected by OLE DB on many databases (Differents folders with many clients and months) to get all thouse connections Im using LOAD *, 'Site' as Source; LOAD *, 'Site1' as Source;LOAD *, 'Site3' as Source; and so on for each connection. Finally I Stored them as BasesTarjetas. Now Im Trying to generate qvds by months because the current qvd is too heavy. Reading in the forum I found this:

http://community.qlik.com/message/200824#200824

I tried to do the same thing with Resident table but it QVD.

Temp:
LOAD  Distinct Month(TDCORTE2) AS MonthName
resident BasesTarjetas;


LET vCount=NoOfRows('Temp');
FOR i=0 to $(vCount)
LET vMonth = Peek('MonthName',$(i),'Temp');



MonthWise:
LOAD *
Resident BasesTarjetas
Where Month(TDCORTE2) = '$(vMonth)';

STORE MonthWise into Month\$(vMonth).qvd;

DROP Table MonthWise;

Next
DROP Table Temp;

!Warning Message Table not found!

Thank you!

1 Solution

Accepted Solutions
bgerchikov
Partner - Creator III
Partner - Creator III

Your log shows

STORE MonthWise into Month\abr.qvd

First, remove "Month\" from the path - most likely it causes the problem. Also, use hardcoded path instead of variable ($vMonth) to test it out.

Instead of "Month\" in the path you can use Directory Month;

View solution in original post

20 Replies
pgalvezt
Specialist
Specialist
Author

Any Help?

Thanks

Not applicable

He,

In these situations it's handy to use the debug mode of qlikview en animate the process. This way you can exactly see what all the values of you variables are at that moment.

If you can't solve it that way, you could try the following code

LET rowText = NoOfRows('Temp');

   let i=1;

          let vMonth = FieldValue('MonthName',$(i));

do while i <=$(rowText)

      let text = FieldValue('MonthName',$(i));

          MonthWise:
          LOAD *
          Resident BasesTarjetas
          Where Month(TDCORTE2) = '$(text )';

          STORE MonthWise into Month\$(text ).qvd;

          DROP Table MonthWise;

i=i+1;

loop;

DROP Table Temp;

pgalvezt
Specialist
Specialist
Author

Thank you for your reply. Im having problems with table Wisemonth. Maybe the table doesn't exist. I left a image.

pgalvezt
Specialist
Specialist
Author

Any Help?

Thanks

bgerchikov
Partner - Creator III
Partner - Creator III

Add NoConcatenate statement:

LET

rowText = NoOfRows('Temp');

  
let i=1;

         
let vMonth = FieldValue('MonthName',$(i));
do while i <=$(rowText)

     
let text = FieldValue('MonthName',$(i));
          MonthWise:

         
NoConcatenate

         
LOAD *
         
Resident BasesTarjetas
         
Where Month(TDCORTE2) = '$(text )';

         
STORE MonthWise into Month\$(text ).qvd;
         
DROP Table MonthWise;

i=i+1;

loop;

DROP Table Temp;

pgalvezt
Specialist
Specialist
Author

NoConcatenate seems work but finally QlikView give error (Faild Script).

Any Ideas?

pgalvezt
Specialist
Specialist
Author

Maybe Im Trying to replicate a script for full QVD. In this case I have many tables but with the same information. So I have a one big tables called BasesTarjetas. Is for this reason Im using Resident.

bgerchikov
Partner - Creator III
Partner - Creator III

You might need to check the log file to see the error. It could be security problem as well. Try to cleenup your output directory and run it again.

pgalvezt
Specialist
Specialist
Author

If you run this QlikView works for you?