lizzie Posted July 2, 2007 Posted July 2, 2007 Greetings How does one go about counting the odd vs even numbers in a record. Each record is made up of 6 fields (N1 - N6). How can I calulate the number of odd vs even numbers in each record? Anyone have a clue? Thanks a million!
Raybaudi Posted July 2, 2007 Posted July 2, 2007 Odd numbers count: Mod( n1 ; 2 ) + Mod( n2 ; 2 ) + Mod( n3 ; 2 ) + Mod( n4 ; 2 ) + Mod( n5 ; 2 ) + Mod( n6 ; 2 )
bcooney Posted July 2, 2007 Posted July 2, 2007 Then, given that there are six fields, the even number count would be the difference ( 6- Odd count). Right?
Vaughan Posted July 3, 2007 Posted July 3, 2007 Imagine how much easier this would be if the "numbers" were in separate related records (one record for each number)... :o
Søren Dyhr Posted July 3, 2007 Posted July 3, 2007 No Vaughan, this thingy should be squeezed into a known metaphor, be it spreadsheet'ish or wordprocessor'ish! --sd
Vaughan Posted July 3, 2007 Posted July 3, 2007 Hey Søren, I'm trying to be *positive* and *helpful* here! I'm in a new job (yeah!) and I've just been asked to make a few changes to a database that has been around for many years... and guess what, it uses repeating fields instead of a relational design too. Gee I hate that! The repeating fields print onto a letter (with sliding/pring set to remove empty repetitions) but the original designer (sic) chose to only show 6/30 repetitions, and the client has 8 things to print! If you're gonna do the qwrong thing, at least do it right! LOL
Raybaudi Posted July 3, 2007 Posted July 3, 2007 ...the even number count would be the difference ( 6- Odd count). Right? Right
Recommended Posts
This topic is 6414 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now