Hi,
I am trying to create a variable as a string in my package, and put the following SQL command into that variable as a expression. I am only facing issues when I need to include the date columns in my query, I am not sure how to cast them, before using them in the expression. I have Effective and Expire date columns in my SQL query.
SELECT A.CUST_ID, A.CUST_LEG_NM, C.CNFG_ID, C.CNFG_NM, B.CUST_CNFG_EFF_DT, B.CUST_CNFG_EXPIR_DT, B.CREAT_TS, B.UPDT_TS, B.UPDT_BY FROM espMB.CUST A INNER JOIN espMB.CUST_CNFG B ON A.CUST_ID = B.CUST_ID INNER JOIN espMB.CNFG C ON B.CNFG_ID = C.CNFG_ID WHERE A.CUST_ID IN (137113) ORDER BY B.CUST_CNFG_EXPIR_DT;
As mentioned in the query, there are 4 columns which I have as dates, B.CUST_CNFG_EFF_DT, B.CUST_CNFG_EXPIR_DT, B.CREAT_TS, B.UPDT_TS. If I remove these columns, I am able to use that variable in the source. But, if I include them I am getting issues.
Can anyone help me in putting this SQL query in an expression way.
Rahul