
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Concatenate variable with a string to obtain another variable
I have a function which has 1 parameter:
SUB CalendarFromField(_param1, _param2)
What I am trying to do is concatenate _param with a string to obtain another string variable which I will use as a table name later:
let new_table_name = ['New_table_' & '$(_param1)'];
let resident_table_name = ['Resident_table_' & '$(_param2)'];
[$(new_table_name)]:
noconcatenate LOAD
*
Resident [$(resident_table_name)]
Order By Date;
The problem is that new_table_name and resident_table_name variables are getting null. Any idea?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using below works:
LET new_table_name = 'New_table_' & '$(_param1)';
LET resident_table_name = 'Resident_table_' & '$(_param2)';
both enclosed with single quotes.
Thanks for guide me in the right direction.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How about trying this:
LET new_table_name = 'New_table_' & $(_param1);
LET resident_table_name = 'Resident_table_' & $(_param2);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using below works:
LET new_table_name = 'New_table_' & '$(_param1)';
LET resident_table_name = 'Resident_table_' & '$(_param2)';
both enclosed with single quotes.
Thanks for guide me in the right direction.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Awesome, as long as you get what you want
For me, it has always been trial and error in the script with the variables. I never get to be sure what will and what won't work.
Best,
Sunny

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I agree. Me too.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
