I have a Sql code which should pull the active data from the table by using an interval function.

Select * from contacts
Where systemmodstamp::date > (current_date - interval '${p_active_data_days_interval} day')::date

The p_active_data_days_interval is used as a parameter and the declared value is set to "30" in setting tab. systemmodstamp is a field of type timestamp without time zone.

When previewing the data resulting an error:

invalid input syntax for type interval: "${p_active_data_days_interval} day"

0 Answers