Results 1 to 4 of 4

Thread: mod function

  1. #1
    Join Date
    Oct 2004
    Posts
    2

    Smile Unanswered: mod function

    how can i enhance this so that i get every 35th record from a table this doesnt seem to work. Any ideas??

    SELECT isa_aUDIT.Client_Code, isa_aUDIT.Appellation1
    FROM isa_aUDIT
    WHERE (((([client_code]+1) Mod "35")="0"));

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Did you test
    WHERE [client_code] Mod 35=0
    OR
    WHERE ([client_code]+1) Mod 35=0

  3. #3
    Join Date
    Oct 2004
    Posts
    2

    Thumbs up

    ihave tried this but it isnt choosing the records i want.

    I have nearly 16000 records on this table but its not selecting from the top of the dataset the 35th then the 70th and then 105th row.

    Have i set this up in the wrong way for this to be done.

    Kind regards

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Post

    I made a query and tested it with the next sql
    PHP Code:
      SELECT zz_Geb_BelegArt_COPY.idzz_Geb_BelegArt_COPY.geb_nr,         
         
    zz_Geb_BelegArt_COPY.BelegArtzz_Geb_BelegArt_COPY.geb2
           FROM zz_Geb_BelegArt_COPY
              WHERE 
    (([idMod 5=0)); 
    The table contains 60 Records, and the query returns 12 Records
    Records 5, 10, 15, 20 .... 55 and 60

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •