Microsoft OLE DB Provider for SQL Server error '80040e14'

Incorrect syntax near the keyword 'WHERE'.

/amp/core/ampDatabase.asp, line 557