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 TouchToneTommy 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: sbbrown9924
  • Content: Threads
  • Order by date
  1. sbbrown9924

    Problem with SELECT DISTINCT date query

    I wrote this query that counts the number of patients seen per day in an ER: SELECT DISTINCT Format(TriageTime,'mm/dd/yyyy') AS [fDate], COUNT(Format(TriageTime, 'mm/dd/yyyy')) AS [ctPatientsPerDay] FROM ARCHIVE GROUP BY Format(TriageTime,'mm/dd/yyyy') that works ok. However, when I go to...
  2. sbbrown9924

    using "partition"

    Hello; About 6 months ago I had asked for assistance to help count the number of patients seen in an ER by hour. The query was: SELECT Partition(DateDiff('n',TriageTime, InRoomTime)/60, 0, 10, 1) AS [WaitingTimeRange], Count(*) As [Patients] FROM Archive WHERE (TriageTime > #DateBegin#)...
  3. sbbrown9924

    Setting NTFS permissions with XP Media Edition

    I just got a new computer with XP Media Edition. Media Edition comes with IIS 5.1 but when right-clicking to set permissions, there is a sharing menu but not permissions like IIS 6. I am getting several errors related to files not having appropriate IUSR_MACHINENAME permissions. How are these...
  4. sbbrown9924

    Select last three records in a recordset

    How would I select the last three records in a recordset?
  5. sbbrown9924

    Count days that a person worked

    I need to write a query that will count how many days within a given time interval (defined by param_DateBegin and a param_DateEnd parameters) a worker worked. The table SocialWorkLog is a log that records encounters with ER patients. Each record is datetimestamped. So if a worker sees one...
  6. sbbrown9924

    Compare string values from two tables

    In a repeat region whenever there is a match of string text from one table compared with another, then I would like to set the background of one of the table cells. Something like... <td background="<%IF {a match exists between strings} Then...
  7. sbbrown9924

    same result using avg and max

    I am developing waiting room statistics for an Emergency Room according to the patient's acuity. In this non-acute query, the query should determine the average and maximum wait times; howewer, I am getting the same result for both the avg and max values. The value for both is the max value...
  8. sbbrown9924

    UNION SELECT problem

    What am I doing wrong here? I am doing a bunch of UNION SELECTS so that I can count the results of a checkbox field. This query only gives me back the results of counting the first condition [ctQ1comer]. SELECT COUNT(Q1) AS [ctQ1comer] FROM Survey WHERE Q1=1 UNION SELECT COUNT(Q1) AS...
  9. sbbrown9924

    Command (Stored Procedure) not accepting variables

    Resources: Windows XP/IIS 5.0/Access/vbscript/asp/Dreamweaver MX2004. I am using a command (stored procedure) within an asp page so that I can write to multiple databases (there is another INSERT INTO in the same page). The command looks like this: <% if(Request.Form("FirstName") <> "")...
  10. sbbrown9924

    Counting the # of patients in a waiting room every hour

    Please help me get organized around a query I need to write. I need to measure waiting room times by every hour in the day in an ER. Currently there is an archive database of all patient encounters and within the record of a patient encounter there is the TriageTime and InRoomTime. The...
  11. sbbrown9924

    Insert Date into parameter

    I have a SQL query: SELECT * FROM Archive WHERE (TXFlag=1 OR TXFlag=-1 OR TXFlag=2) AND (TriageTime BETWEEN #KTparam1# AND #KTparam2#) where KTparam1 has a runtime value of DateBegin, a form text field where the user inserts a date and a default date of 1/1/2006. KTparam2 has a runtime...
  12. sbbrown9924

    query for a not null value

    How would you write a query to capture all records that have a field value that is not null? The field is a number. Thanks. SELECT * From Table where ---> Field Is Not Null <---
  13. sbbrown9924

    A number field - how do you check to see if the field is not null

    I am writing a query where I need to check to see if a field (TXflag) has a value in it. How would I write a query to determine if the field (a number field), is not null? Thanks.
  14. sbbrown9924

    Count Records by month

    I am at the point in learning SQL/ VBscript where I need to combine both into a query. I am writing a query to count the number of patient records per month. Instead of writing 12 separate queries to count / month, how could I write this into a single query? Thanks.
  15. sbbrown9924

    Grouping dates

    I am going to be building a graph showing the distribution of wait times in an ER waiting room. The dataset for this graph will come from a query that will count how many patients waited in a given time interval (ie, 20 patients waited less than an hour, 30, 1-2 hours; 15 2-3 hours, etc). I am...
  16. sbbrown9924

    What fields must be in a GROUP BY when using avg, max?

    I have this query where statistics are executed on various time intervals in a database that tracks ER patients. I am a little fuzzy on using the GROUP BY and ORDER BY clauses. I must be putting the wrong fields in the GROUP BY clause because I am getting the same value for both avg and max...
  17. sbbrown9924

    Convert an integer into minutes

    How would I convert an integer value into minutes so it could be formatted using FormatDateTime(var,4)?
  18. sbbrown9924

    Counting number of records for each day

    I have a database where I am collecting statistics on the number of patients that visited an emergency room. I need to be able to report the highest number of patients that visited in one day during the time reporting interval. I have a simple query that asks for all records in the visitor log...
  19. sbbrown9924

    max datediff in a While loop

    I am looking for the maximum date interval of datediff("n", objRS("TriageTime"), objRS("InRoomTime")) in a "While Not objRS.EOF" loop. I tried this: if datediff("n", objRS("TriageTime"), objRS("InRoomTime")) > MaxWaitingTime then MaxWaitingTime=datediff("n", objRS("TriageTime")...
  20. sbbrown9924

    Statistics for comparison of two Date Fields

    I have an encounter database that logs all the important milestone times when a patient is seen in an ER. These times are TriageTime, InRoomTime, DischargeTime, etc. How would I write a query that performs statistics (min, max, avg, stdev) on the DateDiff of two date fields in a table across...

Part and Inventory Search

Back
Top