home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.paradox      To crash or not to crash, asks Borland      9,834 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 8,233 of 9,834   
   Larry DiGiovanni to Craig   
   Re: Revisting part of a recent post   
   26 Feb 07 16:50:47   
   
   From: nospam@nospam.com   
      
   Craig wrote:   
      
   > I did that and it works. It is just very slow when going through   
   > thousands of records having to do thousands of queries.   
      
   You should be able to find the matching patients in a single query.  Aren't   
   you just looking for all patients admitted between two timeframes who were   
   subsequently admitted within 1 day?   
      
   Loosely based on your info from the 11:06 post:   
      
   SELECT    
     FROM Medinfo admits,   
          Medinfo readmits,   
          BioInfo   
    WHERE admits.admit_dttm BETWEEN '~dtstart' AND '~dtend'   
      AND admits.patkey = readmits.patkey   
      AND admits.discharge_dttm > readmits.admit_dttm + 1   
      AND BioInfo.patkey = readmits.patkey   
      
      
      
   --   
   Larry DiGiovanni   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca