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

Using a variable as table name

Hi,

I wonder if it is possible to use a variable as a table name.

Explanation, i have a lot of reportings and i would love to ad a variable to a tabel name.

vDate = 20130901

the table name from the file is [IZ] and i would love to rename the table name like this $(vDate) IZ

Anyone?

THX in advance.

1 Solution

Accepted Solutions
Not applicable

Hi,

Yes you can use variable as table name. See the below script:

 

SalesIV:

LOAD * INLINE [
Dept, Name, Sales
Inventory, A, 10
Inventory, B, 15
Inventory, D, 2
Sales, A, 14
Sales, C, 30
]
;

set vtabname
= 'Sales';

Test:

NoConcatenate

load

Dept

Resident

$(vtabname)IV;

Hope this help,

Anosh

View solution in original post

2 Replies
swuehl
MVP
MVP

Yes ,should not be a big problem. Have you tried something like

[$(vDate) IZ]:

Load ... From ...;

Not applicable

Hi,

Yes you can use variable as table name. See the below script:

 

SalesIV:

LOAD * INLINE [
Dept, Name, Sales
Inventory, A, 10
Inventory, B, 15
Inventory, D, 2
Sales, A, 14
Sales, C, 30
]
;

set vtabname
= 'Sales';

Test:

NoConcatenate

load

Dept

Resident

$(vtabname)IV;

Hope this help,

Anosh