I have a where clause that says:
select * from tablename
where :x < y or y is null
and :x > z
I tried to rewrite it so that it uses :x once as shown below but I don't understand why I keep getting an error that says 'SQL command not properly ended'.
where z < :x < y or y is null
Any help would be appreciated, thanks.