Solved

Modular Division in Microsoft SQL

Posted on 2004-08-19
1
3,649 Views
Last Modified: 2012-08-13
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

- Michael
0
Comment
Question by:mjs082969
1 Comment
 
LVL 10

Accepted Solution

by:
AustinSeven earned 250 total points
ID: 11841402
T-SQL MOD is %

AustinSeven
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now