none
Age calculation RRS feed

  • Question

  • I am using a function that was developed by someone for age calculation.  It calculates the birth date and the date of dx for age calculation.

    So the input is birth_date and date_dx, and the return value is age in int.

    I have a problem filtering for age < 30.  How can I filter the record to return only rows that meet my criteria of age 0-29?

    Thank you for your advice.

    Sincerely,

    Sally

    Monday, December 9, 2013 11:26 PM

Answers

  • I am having a problem with sql server.

    I now have a turnaround for this issue.  I use the fuction to retrieve age first on a view.  Then from the view I filter the age < 30 which solve this problem.

    I believe the file is very large i.e. over 3 million rows returned and I was having problem  getting the records back, as each time  I have an error indicating time expired. 

    When I split it in 2-step process, it works!

    Thanks for your feedback on the WORD which I have learned from you.

    Sally

    • Marked as answer by Sally Lue Tuesday, December 10, 2013 11:26 PM
    Tuesday, December 10, 2013 11:26 PM

All replies

  • Is this an issue you are having in Word or another program?

    Chris Ward

    Tuesday, December 10, 2013 1:37 AM
  • If this is for a mailmerge, you can use the mailmerge filters, via Edit recipient List > Filter.

    Alternatively, you could use a SKIPIF field, coded along the lines of:
    {SKIPIF «Age» > 29}
    where 'Age' is the data field containing the ages.

    Note: The field brace pairs (ie '{ }') for the above example are created in the body of the document via Ctrl-F9 (Cmd-F9 on a Mac) - you can't simply type them or copy & paste them from this message. Likewise, you can't type or copy & paste the chevrons (ie '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar. The SKIPIF field should be the first one in the document or, if it's a label merge, for each label.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Tuesday, December 10, 2013 5:49 AM
  • I am having a problem with sql server.

    I now have a turnaround for this issue.  I use the fuction to retrieve age first on a view.  Then from the view I filter the age < 30 which solve this problem.

    I believe the file is very large i.e. over 3 million rows returned and I was having problem  getting the records back, as each time  I have an error indicating time expired. 

    When I split it in 2-step process, it works!

    Thanks for your feedback on the WORD which I have learned from you.

    Sally

    • Marked as answer by Sally Lue Tuesday, December 10, 2013 11:26 PM
    Tuesday, December 10, 2013 11:26 PM