I'm trying to use the Select statement below in SQL Expression Field but I'm getting error:
SELECT COUNT(*) AS Expr1
FROM dbo.EDT__Product__Item_Master
WHERE (SUBSTRING(Merchandiser_Code, 3, 1) = 'I') AND (Country_Identifier = 'U')
Error:
Error in compiling SQL Expression:
Failed to retrieve data from the database.
Details: ADO Error Code: 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: Incorrect syntax near the keyword 'SELECT'.
SQL State: 42000
Native Error: [Database Vendor Code: 156].
Any help will be appreciated!
TIA
Edited by: Cindy Yuan-Suger on Mar 3, 2009 7:27 PM