SQL stmt:
SELECT TOP 5 col1, col2, Format(col3with$text,"#,##0.00") AS Expr1
FROM myTBL
produces results as expected
but SQL stmt:
SELECT TOP 5 col1, col2, Format(col3with$text,"#,##0.00") AS Expr1
FROM myTBL
WEHRE Format(col3with$text,"#,##0.00") > 0
produced syntax error
what's the correct syntax? Thanks.
1 - It's
WHERE, notWEHRE.2 -
Format()returns a string, you can't compare this with> 0.Converting to Currency is probably better:
3 -
SELECT TOP 5makes little sense without an ORDER BY clause.