Dear all

i'm getting an error with the code below

The Error....

SQL Syntax Errors Encountered

Error in Select clause: expression near 'DESC'.
Missing from clause
Unable to parse query text

Any ideas....

I'm using...

  • Visual Studio 2010
  • .DBF Database
  • Foxpro
  • Building Windows app
SELECT        product.code, product.DESC, ullage.counttotal
FROM            product LEFT JOIN
                         ullage ON product.code = ullage.code
ORDER BY product.code

I'm not familiar with FoxPro but DESC is related to ORDER BY. With "standard" syntax the query should be

SELECT product.code, ullage.counttotal
FROM product LEFT JOIN ullage ON product.code = ullage.code
ORDER BY product.code DESC

HTH