In SQL Server, it's the percent sign.  For example:

Print 5 % 3

Output:  2



-----Original Message-----
From: Scott Weikert [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 24, 2003 16:19
To: SQL
Subject: Is there a "MOD" style function in MS SQL?

I'm poking around the Books Online for MS SQL trying to find if there's
a 
way to do this:

In ColdFusion, you can do "(variablename) MOD (value)" to see if the
value 
of the variable divides evenly by the supplied value or not. Not sure
how 
to do a SELECT doing that same style check on a field value, though.

In my case, I've got a field in a table that either will be a multiple
of 
100 or not, and I want to be able to get all of the records of one group
or 
the other.

--Scott


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:6:1665
Archives: http://www.houseoffusion.com/lists.cfm?link=t:6
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:6
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=<:emailid:>.<:userid:>.<:listid:>

ColdFusion MX 6.1, now 2.5 times faster. 
http://www.macromedia.com/software/coldfusion/productinfo/upgrade/jump/introducing.html?trackingid=ColdFusion_468x60g_HouseofFusion_carat_082803

                        

Reply via email to