SQL - Nested Queries?

SUGGESTED

I'm new to Sage, using 100 Advanced.

For SQL, why doesn't this script work:

SELECT *

FROM (SELECT ItemCode, QuantityOnHand WHERE Warehouse="100" FROM ItemWarehouse) AS STUFF

Please disregard spelling errors (if any). I've used this style of syntax in the past and it worked fine. But in Sage I keep getting an error.

I have the same issue with CASE statements. Even basic ones don't seem to work.

I also cannot do this:

SELECT LEFT(ItemCode,1) AS STUFF

FROM CI_Item

I could use some help, if anyone could steer me in the right direction.

Thanks,