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

choose which tables to download

Hi all,

first of all thanks for any help.

simply put I download a selection of tables from an SQL server somewhere, stored, dropped and reloaded and manipulated. these tables are pretty large but the majority are pretty static so I would like is something along the lines of;

  1. user clicks reload (this is a button) and a msgbox of sorts appears
  2. the user can tick/select which tables they want to download
  3. the script is edited in someway to reflect the ticks
  4. the new reload takes place

any ideas?

a few of my tables are below if someone wants to take a crack at it.

ODBC CONNECT32 TO AFMS;
//-------- Start Multiple Select Statements ------

[Equipment Coordinates]:
SQL SELECT *
FROM AFMS.dbo."tl_ims_equipment";
store [Equipment Coordinates] into Equipment Coordinates.qvd;
drop table [Equipment Coordinates];

[Fault List]:
SQL SELECT *
FROM AFMS.dbo."All_Faults";
store [Fault List] into Fault List.qvd;
drop table [Fault List];


[On Hold Table]:
SQL SELECT *
FROM AFMS.dbo."fault_configuration";
store [On Hold Table] into On Hold Table.qvd;
drop table [On Hold Table];

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

You can do this with the following steps:

  • Create an inline load containing the table names (lets call the field 'TableName'
  • Add a list box with that field. You may want to set 'Always One Selected'
  • Create a variable (lets call it vTableName), defined as  "=MinString(TableName)"   -- the = sign is part of the definition, the quotes are not.
  • Add a button with a Reload action
  • Use the following script:


Data:

SQL SELECT *

FROM AFMS.dbo."$(vTableName)";

Store Data into [$(vTableName).qvd] (qvd);

drop table Data;

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
samuel_brierley
Creator
Creator
Author

Excellent ill have a play with that thanks