Calculating a MOD 10 Check Digit


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Calculating a MOD 10 Check Digit

  1. #1
    Scott Guest

    Calculating a MOD 10 Check Digit


    How do I perform a MOD calculation in SQL when the MOD operator is not available?

    Scott
    Example: 12 MOD 10 = 8

  2. #2
    Madhu Guest

    Re: Calculating a MOD 10 Check Digit


    Use % called as Modulo in SQL Server to perform a MOD calculation.

    exECLARE @A INT
    DECLARE @B INT
    SET @A=12
    SET @B=10
    SELECT @A%@B

    Result is
    2

    Madhu.

    "Scott" <sremiger@pnms.com> wrote:
    >
    >How do I perform a MOD calculation in SQL when the MOD operator is not available?
    >
    >Scott
    >Example: 12 MOD 10 = 8



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center