Modular Division in Microsoft SQL
Posted on 2004-08-19
I have written a query executed from VB through ADO on an Access database, that I am trying to move to Microsoft SQL Server. The statment uses modular division in a comparison. Access is OK with it, but SQL Server generates the following error
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'MOD'.
The statement goes something like this:
WHERE ((xSys MOD 1000) = (ySys MOD 1000))
I am trying to compare the last x digits of two numbers.
Thanks In Advance