Hi everyone,
I have the query below (which works without issue) but I would like to use cells as parameters so users do not have to update the query itself.
I have the LINE_NUMBER clauses figured out, I just do not know how to make this work for the two LIKE ANY clauses:
I know the question mark alone doesn't work in teradata/sql. I am pasting this into excel.
I have the query below (which works without issue) but I would like to use cells as parameters so users do not have to update the query itself.
SQL:
SELECT
LINE_NUMBER,
SHOP_ORDER_IDENTIFIER,
SHOP_ORDER_OPERATION_IDENT,
Upper(SO_OPERATION_DESCRIPTION) AS OP_DESC
FROM BCDW_PROD_V.VL_SO_OPERATION_V
WHERE SOURCE_END_TS IS NULL
AND LINE_NUMBER >= 1060
AND LINE_NUMBER <= 1063
AND SHOP_ORDER_IDENTIFIER LIKE ANY ('FAD2_B_JB136_')
AND OP_DESC LIKE ANY ('%GAP%','%SAND%')
I have the LINE_NUMBER clauses figured out, I just do not know how to make this work for the two LIKE ANY clauses:
SQL:
SELECT
LINE_NUMBER,
SHOP_ORDER_IDENTIFIER,
SHOP_ORDER_OPERATION_IDENT,
Upper(SO_OPERATION_DESCRIPTION) AS OP_DESC
FROM BCDW_PROD_V.VL_SO_OPERATION_V
WHERE SOURCE_END_TS IS NULL
AND LINE_NUMBER >= ? --WORKING
AND LINE_NUMBER <= ? --WORKING
AND SHOP_ORDER_IDENTIFIER LIKE ANY ? --NOT WORKING
AND OP_DESC LIKE ANY ? --NOT WORKING
I know the question mark alone doesn't work in teradata/sql. I am pasting this into excel.