Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Doc94
  • Order by date
  1. Doc94

    Median and group by

    I am trying to expand upon and already useful median query in SQL. I need to figure out where to put a GROUP BY statement so I can get the median "length of stay" grouped by a field in the table called "TSheetTitleDescription". The folowing is the median query that works flawlessly: SELECT...
  2. Doc94

    Median

    I also have this function but can not get it to work correctly within a query. Or anywhere else for that matter. Function DMedian(expr As String, domain As String, Optional criteria As String) As DoubleDim dbs As DatabaseDim rst As RecordsetDim middleIndex As Integerdim numberOfRecords as...
  3. Doc94

    Median

    I think I can add GROUP BY TSheetTitleDescription in the first query as it is a field in the LOS_min_amb_work query I am just not sure where to put it.
  4. Doc94

    Median

    I need some help with a median calculation. I can calculate the median length of stay for a group of patients with the following query I picked up. SELECT Avg([R1]) AS Median FROM [ SELECT Max(Q1.R2) AS R1 FROM (SELECT TOP 50 PERCENT LOS_min_amb_work.los AS R2 FROM...
  5. Doc94

    Median

    I am trying to calculate the median of some times taken from a query. The query calculates time from arrival to disposition in minutes. (by multiplying the time by 1440). My access report can spit out the average of these for all the patients but the median is a different story. I have dound...
  6. Doc94

    Number present during a time period

    Golom- I have tried but can not get this to work. I already have a table clock which should be the same as the integers table. I have a large "detail" table with most of the other data in it including hospital arrival time and disposition time. I have tried substituting the "detail" table for...
  7. Doc94

    Number present during a time period

    To further explain: Patient 1 arrives at 10 am and leaves at 2pm Patient 2 arrives at 11 am and leaves at 1pm Patient 3 arrives at 11 am and leaves at 4:30pm. A chart of this would look like this Time 10 11 12 1 2 3 4 5 Pt. 1 Yes Yes Yes Yes No No No No...
  8. Doc94

    Number present during a time period

    I am looking for some expertise in writing a query. This is from a large Emergency Department database written in access 2000, front and back end...... I have a patient ID (unique), arrival time and discharge time. What I need to do is count the number of peole in the department each hour. I...
  9. Doc94

    Report field

    The Nz statement worked great. Thanks
  10. Doc94

    Report field

    Can I use something of this nature? I want the field to show if the person was admitted, to what unit and room number and if they are transfered, to what facility. This control source does not work but I thought maybe someone could fix it. =Trim([PatientCareUnitDescription] & " " &...
  11. Doc94

    Report field

    I have a report based on a query. I need one of the report fields to get it's result from two different query fields. Any help would be appreciated.
  12. Doc94

    Sorting and grouping

    I have a reprt based on a query. Each listing in the report has multiple items- name, account number, mode of arrival, diagnosis. All of the items are single in the listing except diagnosis which may have multiple items. When I run the report it lists a name and account number and all the...
  13. Doc94

    Security

    what is the /wrkgrp switch?
  14. Doc94

    Security

    How do I move a database I created and secured on my laptop to a network drive and then on to computers for other folks to use? I have copied the security file (mdw) to the other computer but it does not give me the ability to use the workgroup administrator tool to join the mdw file. It says...
  15. Doc94

    Migration to SQL server

    Where is the DTS import tool located? Also, I understand Access front ends and back ends but I am ignorant to SQL. Will I need to create a new SQL backend? Shuld I conovert my Access backend to SQL and attach the access front end to it? Will the server I use need to have SQL running on it or...
  16. Doc94

    Migration to SQL server

    I have an extensive database I would like to convert to SQL server. I created it in Access 97 and have upgraded to access 2000 (no further as all of the computers on the network do not support Access beyond 2000). I have a front end on each cmputer that uses it and a backend residing on one of...
  17. Doc94

    Time interval shutdown

    I am looking for a way to use the time interval to automatically shut down a database after a period of inactivity. It is health care related and HIPPA requirements dictate this. Any thoughts on the code would be appreciated. And where the code should be inserted- into the main data entry form...
  18. Doc94

    Find duplicates in last 48 hours

    One other thing- the query was written in Access using the design view and not the SQL view. I cannot take credit that my SQL writing is anywhere near that good.
  19. Doc94

    Find duplicates in last 48 hours

    Jimirvine- Thanks that is useful information. Most of the calculations are time related not date related. I do not see the TimeDiff as a built in function- will it still work? One problem I am having with the speed of the database is the backend has been moved to a different server. safer...
  20. Doc94

    Find duplicates in last 48 hours

    That makes sense. What other instances would using an alias be useful? The following is a query I use to look at times. It is a long drawn out query that takes forever to run. PARAMETERS [Enter Beginning Date] DateTime, [Enter Ending Date] DateTime; SELECT Detail.[ED#]...

Part and Inventory Search

Back
Top