Question

Hi I want to implement the following between clause in sql db2:

between start_date - 1 days and end_date

where start_date and end_date are standard dates, and I want to search between the day before the start_date up to the end_date. I however get the following error:

An expression with a datetime value or a labeled duration is not valid

however if I try:

between start_date and end_date + 1 days

there are no complaints. how do I get the first clause to work?

Thanks

Was it helpful?

Solution

Have you tried using parentheses?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top