Re: Use Cell Value to Insert into a QuerySo... after some playing around and additional research this can be done pretty easily just assigning a value to the cell using (Column (5)[1]). My solution below:
query1 = (Column(5)[1]);
query2 = (Column(5)[2]);
query3 = (Column(5)[3]);
query4 = (Column(5)[4]);
query5 = (Column(5)[5]);
data_sql = evalinsert("Select*
FROM ^query1^
WHERE Date between '2019-08-01' and '2019-08-31'
");
data_dt = Execute Sql (dbc, data_sql);
Use Cell Value to Insert into a QueryHello,
Is it possible to use a cell value and insert that into a query? I have a table (shown below) and I would like to use the column "Query", to use only one cell value and place into my query statement. Maybe assign the cell value and plug that into the query?
Table:
Month Year Daily? Table Name Query 7 2019 Not TRANS_0719 TRANS_0719 8 2019 Not TRANS_0819 TRANS_0819 9 2019 Not TRANS_0919 TRANS_0919 10 2019 Not TRANS_1019 TRANS_1019 11 2019 TRANS_DAILY TRANS_1119 TRANS_DAILY
Query:
data_sql = evalinsert("Select * FROM *want to insert specific value from Query column* WHERE Date between '2019-08-01' and '2019-08-31' ");
data_dt = Execute Sql (dbc, data_sql)I have all of this in a JSL but just wanted to figure out this last piece for it.
Any help or advice greatly appreciated!