Click here to Skip to main content
15,905,912 members

Comments by James Glisson II (Top 1 by date)

James Glisson II 1-Dec-23 7:15am View    
Yes, I understand the error message and I know where the error is. My question is, how do I properly write the statement in App.Config (passing a SysDate parameter. ":ADHERENCEDAY"). If I don't pass the :ADHERNCEDAY parameter, the query runs fine. It's only when I pass the parameter in the Sysdate function that causes the problem. I illustrated that in my initial example. I added the error message just for context. I am trying to figure out the proper syntax for passing a parameter in app.config in the sysdate function of my query.

Parameter Value: <add key="ADHERENCEDAY" value="1">

Works great (not passing a parameter)-> From TMDM.Adherence where CALENDAR_ID >= ( 1||to_Char( sysdate - INTERVAL '1' day, 'YYYYMMDD'))
Does not work -> From TMDM.Adherence where CALENDAR_ID >= ( 1||to_Char( sysdate - INTERVAL ':ADHERENCEDAY' day, 'YYYYMMDD'))
I am only looking for the proper syntax to get this to work. I have included in my example only a few things that I have tried.