where - SQL Combine same bind variable -
i have clause says:
select * tablename :x < y or y null , :x > z
i tried rewrite uses :x once shown below don't understand why keep getting error says 'sql command not ended'.
where z < :x < y or y null
any appreciated, thanks.
the expression trying use z < x < y
not standard sql.
you can come close with:
where :x between y , z or y null;
the difference between
'y <= x <= z'
. if inequality needed , values integers, can do:
where :x between y + 1 , z - 1 or y null;
Comments
Post a Comment