I'm using SPSS Modeler in order to connect to a database and run a SQL query.
Let's say I have a query like this
SELECT
COUNT(distinct
CASE WHEN "Product__Ord_Ln_"
IN
(
'Discount1',
'Discount2',
'Discount3',
/*
...
'Discount5000'
*/
)
THEN 1
END ) "DISC_ACCESS"
FROM PRODUCT_TABLE
As you can see, I have "Discounts" in my CASE statement that I have to add manually every time when I run to my query and have an update for these discounts. At the same time, I have Excel file which I update regulary to store this information.
I don't have rights to create temp tables when I run my queries.
Is there any way to have a link between my SQL query and that Excel file, so I could run something like this
SELECT
COUNT(distinct
CASE WHEN "Product__Ord_Ln_"
IN
(
Excel_File_Discounts_Column.'Discount1',
Excel_File_Discounts_Column.'Discount2',
Excel_File_Discounts_Column.'Discount3',
/*
...
Excel_File.'Discount5000'
*/
)
THEN 1
END ) "DISC_ACCESS"
FROM PRODUCT_TABLE
Or any other efficient way to do this?