Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator
Creator

store into path with variables

here is my code

FOR vCount = 0 to NoOfTables()-1

LET vTableName = TableName($(vCount));

Let vFilelocation = $(vPathQVDExtract) & '000_Title_Extract_' & $(vTableName) & '.qvd';

STORE $(vTableName) INTO $(vFileLocation) (qvd);

Drop Table $(vTableName);

NEXT vCount

Cant get it to work

keeps giving me an error like

Syntax Error.

Unexpected token: '.', expected nothing

Any help please

4 Replies
Master III
Master III

Try variables in quotes

STORE '$(vTableName)' INTO '$(vFileLocation)' (qvd);

Champion III
Champion III

try this

STORE  $(vTableName) into  $(vFileLocation).qvd (qvd);

or

STORE  '$(vTableName)' &  ' into $(vFileLocation)'.qvd (qvd);

Hi Mike,

Set vTableDrop = '';

FOR vCount = 0 to NoOfTables()-1;

LET vTableName = TableName($(vCount));
Let vTableDrop = '$(vTableDrop)' & If('$(vTableDrop)' ='','',', ') & '$(vTableName)';
Let vFileLocation = '$(vPathQVDExtract)' & '000_Title_Extract_' & '$(vTableName)' & '.qvd';

STORE $(vTableName) INTO [$(vFileLocation)] (qvd);


NEXT vCount

Drop Table $(vTableDrop);

Contributor III
Contributor III

Hi Mike,

Please give the file name within single quotes. Also remove all concatenation part.

Let vFilelocation = '$(vPathQVDExtract)000_Title_Extract_$(vTableName).qvd';

FOR vCount = 0 to NoOfTables()-1

LET vTableName = TableName($(vCount));

Let vFilelocation = '$(vPathQVDExtract)000_Title_Extract_$(vTableName).qvd';

STORE $(vTableName) INTO $(vFileLocation) (qvd);

Drop Table $(vTableName);

NEXT vCount

Hope this will help you.

Regards,

Binu