2 Replies Latest reply: Jan 24, 2013 4:40 AM by Jeroen Scheper RSS

    Range of age

      Hi Experts,

       

      I have a problem with the following situation. I got a data view called AGERANGES with the following structure and data:

      AGEFROM AGETILL AGEGROUP

      4                 16               4-16

      17               33              17-33

      34               77              34-77

      78               119             78-119

       

      Next to this table I have a person table named PERSON with a field birthdate.

       

      Now i have the following coding in my script:

       

      Leeftijden:

      LOAD AGEFROM+(iterNo()-1) as Age,

                GROUPNAME

                WHILE IterNo() <= (AGEFROM - AGETILL)

                ;

      SQL SELECT

                AGEFROM,

                AGETILL,

                GROUPNAME

      FROM AGERANGES ;

       

      personen:

      LOAD

                BIRTHDATE,

                Age (today(), BIRTHDATE) as Age,

      etc......

       

      When my source is a Excel file with the script above and I looked in QW in the leeftijden table the result is as attached in attachment.

      If the result is as I descibed in the attachment I can join it easily with the person table.

       

      If I use the dataview AGERANGES the table is empty

       

      Can anybody help me?