I have a problem with my Expression sql on SSIS - i use parameter and i would like use function GETDATE but i have a error... all printscr on attached
If i used sql like below i have a result
"select kssales.salesorderhead.NEW_DATE,ordernumber from kssales.salesorderhead inner join kssales.salesorderposition on kssales.salesorderhead.SALESORDERHEAD_ID = kssales.salesorderposition.SALESORDERHEAD_ID inner join KSSALES.VKCUSTOMER on kssales.salesorderhead.VKCUSTOMER_ID = KSSALES.VKCUSTOMER.VKCUSTOMER_ID AND kssales.salesorderhead.NEW_DATE>'" +(DT_STR, 20, 1252)(DATEADD( "DD", -@[User:NI_WSTECZ],@[System::StartTime]))+"'"
But if i change @[System::StartTime] to GETDATE() I have a error
"select kssales.salesorderhead.NEW_DATE,ordernumber from kssales.salesorderhead inner join kssales.salesorderposition on kssales.salesorderhead.SALESORDERHEAD_ID = kssales.salesorderposition.SALESORDERHEAD_ID inner join KSSALES.VKCUSTOMER on kssales.salesorderhead.VKCUSTOMER_ID = KSSALES.VKCUSTOMER.VKCUSTOMER_ID AND kssales.salesorderhead.NEW_DATE>'" +(DT_STR, 20, 1252)(DATEADD( "DD", -@[User:NI_WSTECZ],GETDATE()))+"'"
can you tell me how can I change my sql query, to see reult?
If i used sql like below i have a result
"select kssales.salesorderhead.NEW_DATE,ordernumber from kssales.salesorderhead inner join kssales.salesorderposition on kssales.salesorderhead.SALESORDERHEAD_ID = kssales.salesorderposition.SALESORDERHEAD_ID inner join KSSALES.VKCUSTOMER on kssales.salesorderhead.VKCUSTOMER_ID = KSSALES.VKCUSTOMER.VKCUSTOMER_ID AND kssales.salesorderhead.NEW_DATE>'" +(DT_STR, 20, 1252)(DATEADD( "DD", -@[User:NI_WSTECZ],@[System::StartTime]))+"'"
But if i change @[System::StartTime] to GETDATE() I have a error
"select kssales.salesorderhead.NEW_DATE,ordernumber from kssales.salesorderhead inner join kssales.salesorderposition on kssales.salesorderhead.SALESORDERHEAD_ID = kssales.salesorderposition.SALESORDERHEAD_ID inner join KSSALES.VKCUSTOMER on kssales.salesorderhead.VKCUSTOMER_ID = KSSALES.VKCUSTOMER.VKCUSTOMER_ID AND kssales.salesorderhead.NEW_DATE>'" +(DT_STR, 20, 1252)(DATEADD( "DD", -@[User:NI_WSTECZ],GETDATE()))+"'"
can you tell me how can I change my sql query, to see reult?