[Closed] Percentage sign?

Man I'm totally boggled!

I have never seen this bit of code in my past 6 years of working with SQL Server. It seems very simple but can some one please explain to me what the "Percentage" sign between those two columns is doing? I googled but to no avail.

**SELECT @default_late_fees =
  CASE @default_days_out % @default_product_price_days_out
            <br>WHEN 0 <br>THEN (@default_days_out / @default_product_price_days_out) * @default_amount 
            <br>ELSE (FLOOR(@default_days_out / @default_product_price_days_out) + 1) * @default_amount 
       <br> END**
more ▼

asked Mar 23, 2011 at 10:52 AM in Default

Slick84 gravatar image

1.3k 75 102 142

Modulo! I guess I should have pressed F1 and clicked Arithmetic Operators first. I thought it could only be used in the LIKE statement. Boy do I feel dumb today.
Mar 23, 2011 at 11:04 AM Slick84
Don't put yourself down... we all make mistakes at times. And at least you had the cojones to come back here and 'fess up!
Mar 23, 2011 at 11:19 AM ThomasRushton ♦

I would like to echo Thomas. I can not tell you how many things that I have posted, to just find the answer a few min. later.

Feb 16, 2012 at 06:04 PM Chris shaw
(comments are locked)
10|1200 characters needed characters left

The question has been closed Mar 23, 2011 at 11:03 AM by Slick84 for the following reason:

0 answers: sort voted first

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Mar 23, 2011 at 10:52 AM

Seen: 2962 times

Last Updated: Feb 16, 2012 at 06:04 PM