Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
spikenaylor1
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
sasiparupudi1
Master III
Master III

Try variables in quotes

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

Chanty4u
MVP
MVP

try this

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

or

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

tamilarasu
Champion
Champion

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);

binujose1982
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