Just in addition to all the other responses, select * from mytable where (myfield mod 2) = 0 -this selects all the records where the "remainder" after dividing by 2 is 0. aka Even Numbers
select * from mytable where (myfield mod 2) <> 0 selects all the records where the "remainder" after dividing by 2 is not 0. aka Odd Numbers you can apply this further to choose every 5th or 10th record by changing the (myfield mod X) value to the number of your choice ie: "select * from mytable where (myfield mod 5) = 0" retrieves every 5th record Hope that helps, Jason ____________________________ Jason Adam Computer Draftsperson De Beers Canada Exploration Inc. Toronto, ON [EMAIL PROTECTED] -----Original Message----- From: Kjartan Greiff Selnes [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 8:27 AM To: Mailingliste Mapinfo Subject: MI-L even number or not.. Hi folks. This has been an topic before but anyway: How do i select even (or odd) numbers in a coloumn. i know it's something about 'Mod' but i cant seem to get the syntax correct Kjartan. _______________________________________________________________________ List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MapInfo-L" in the message body. _______________________________________________________________________ List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MapInfo-L" in the message body.
