?
Solved

Modular Division in Microsoft SQL

Posted on 2004-08-19
1
Medium Priority
?
3,654 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 10

Accepted Solution

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

AustinSeven
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Suggested Courses

765 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