select rows divisible by 5

Please support our MS SQL advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2006
Posts: 2
Reputation: beginner123 is an unknown quantity at this point 
Solved Threads: 0
beginner123 beginner123 is offline Offline
Newbie Poster

select rows divisible by 5

 
0
  #1
Jul 17th, 2006
I'm trying to display only rows where the identity column is divisible by 5. Could someone help with this?
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 523
Reputation: pty is on a distinguished road 
Solved Threads: 37
pty's Avatar
pty pty is offline Offline
Posting Pro

Re: select rows divisible by 5

 
0
  #2
Jul 17th, 2006
Originally Posted by beginner123
I'm trying to display only rows where the identity column is divisible by 5. Could someone help with this?
  1. SELECT id FROM mytable mt WHERE (mt.id % 5) = 0
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 2
Reputation: beginner123 is an unknown quantity at this point 
Solved Threads: 0
beginner123 beginner123 is offline Offline
Newbie Poster

Re: select rows divisible by 5

 
0
  #3
Jul 18th, 2006
Originally Posted by pty
  1. SELECT id FROM mytable mt WHERE (mt.id % 5) = 0
Thanks very much!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC