Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2011
    Posts
    2

    Unanswered: Need to purge my database

    I have inherited a huge database with this job.

    We need to pull the "deceased" patients out of the current patient database, leaving only "active" patients but we don't want to lose the "deceased" patient's information.

    I'm a relatively new Access user, how do I do this? Thanks.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    easiest?
    add a column that indicates if this is an active patient
    then exclude or include inactive patients as required.
    the advantage of this approach is that the data is still there and available if required.

    if you already have a date column, or other column, which you can work out if a patient is active or no t then 'just' exclude / include on that columns value
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jul 2011
    Posts
    2

    Thank you so much

    I hate to sound dense, but we have a column that says "active" or "deceased" or "inactive". Are you saying that if we have 3 separate columns for the 3 words, we could exclude the deceased and inactive patients? How do you exclude?

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    no
    exclude records as required

    if you want active records then

    WHERE mycolumn = 'active'

    or

    WHERE mycolumn NOT IN ('inactive', 'deceased')

    to retrieve deceased

    WHERE mycolumn = 'deceased'

    note mycolumn is the name of the column that identifies the state of the patient.
    a word of caution you are making it trickier for yourself by using text to describe this as most computers regard DECEASED as different to Deceased or deceased. I'd suggest you have another table which identifies patient status types ie active, deceased, inactive or wahtever and use the index of that status in the patient table

    that becomes less prone to problems using an integer (makes it harder to read but more dependable when manipulating data
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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