i also found out mod doesnt work with the reserved word count. Too bad huh?
:P
----- Original Message -----
From: "Troy Sosamon" <[EMAIL PROTECTED]>
To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]>
Sent: Thursday, November 21, 2002 1:23 PM
Subject: RE: Witango-Talk: modulus
> It needs to by backwards because you want multiple results. Lets make an
> example and use small numbers:
>
> Your list - the values you are looking at 1,2,3,4,5,6,7,8,9,10.
> Lets say we want to find the list 1, 6, 11, 16 or (5 * x + 1) where x is
> 0,1,2,3,4.
> So (mod(1,5)) = 1, (mod(2,5)) = 2, (mod(3,5)) = 3 .... (mod(5,5))=0,
> (mod(6,5))=1....
>
> We want all of the results that have the result of 1.
>
> Now after I made a long example and re-read your question, I don't think
it
> makes any difference which way you have it 1 = (mod(x,y)) or (mod(x,y) =
1,
> but the trick is you need to col name in the mod function and not as the
> result.
>
> Troy Sosamon
>
> ===== Original Message from [EMAIL PROTECTED] at 11/21/02 1:45 pm
> >that is interesting, why is it 1 = instead of = 1? Will it run faster
that
> >way?
> >
> >----- Original Message -----
> >From: "Troy Sosamon" <[EMAIL PROTECTED]>
> >To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]>
> >Sent: Thursday, November 21, 2002 12:39 PM
> >Subject: RE: Witango-Talk: modulus
> >
> >
> >> You should be able to get this to work, but you need to think
backwards.
> >> Try something like this:
> >>
> >> select ..... where 1 = (mod(colname,50))
> >>
> >> Remember you want to look at the mod of the col value and find the
results
> >> that equal 1.
> >>
> >> Troy Sosamon
> >>
> >> -------- Original Message --------------
> >>
> >> hello, i have a table, and for paging reasons, i want to get every
entry
> >> where:
> >>
> >> count modulus 50=1
> >> and
> >> count modulus 50=0
> >>
> >> this would make it so i could make a drop down list that had ranges
like:
> >>
> >> 1..50
> >> 51..100
> >> 101..150
> >>
> >> etc.
> >>
> >> problem is i cant find how to do modulus in SQL. Is there a way? If
not
> >is
> >> there another way to do this without a for loop?
> >>
> >>
________________________________________________________________________
> >> TO UNSUBSCRIBE: send a plain text/US ASCII email to
[EMAIL PROTECTED]
> >> with unsubscribe witango-talk in the message body
> >>
> >
> >________________________________________________________________________
> >TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
> > with unsubscribe witango-talk in the message body
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
> with unsubscribe witango-talk in the message body
>
________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
with unsubscribe witango-talk in the message body