when I Specify Values for Template Parameters, this runs fine for me:
select * from <xyz, varchar,YourTable> WHERE ID<=1000 AND ID>=20000
perhaps you do not have every parameter's "<" and ">" paired properly
EDIT I see the problem now:
SELECT * FROM <xyz, varchar,YourTable> WHERE ID<=1000 AND ID>=20000 AND <xyz2,varchar,YourColumn> IS NOT NULL
results in:
SELECT * FROM YourTable WHERE IDYourColumn IS NOT NULL
try making the "<" character into a parameter, like this:
SELECT * FROM <xyz, varchar,YourTable> WHERE ID<lessthan,char,<>=1000
AND ID>=20000 AND <<xyz2,varchar,YourColumn> IS NOT NULL
it results in:
SELECT * FROM YourTable WHERE ID<=1000
AND ID>=20000 AND YourColumn IS NOT NULL
OR split the lines, line breaks seem to make a difference:
SELECT * FROM <xyz, varchar,YourTable> WHERE ID<=1000 AND ID>=20000
AND <xyz2,varchar,YourColumn> IS NOT NULL
results in:
SELECT * FROM YourTable WHERE ID<=1000 AND ID>=20000
AND YourColumn IS NOT NULL