Search results

  1. O

    Any brilliant minds for this sql question

    I'm going to have a dataset in a temp table with columns: PatientID (varchar) LabValue (float) CollectionDateTime (datetime) A patient ID may repeat 1, 5, or 100 times in this table, with various collection dates and lab values. I need to end up with the following information: For each...
  2. O

    DateDiff returns INT, divided by 24 still returns INT--i want decimal

    Datediff(hour,startdatetime,stopdatetime) returns INT. Datediff(hour,startdatetime,stopdatetime)/24 still returns INT. I want a decimal or two on there, so that I can calculate partial days (it all adds up when aggregating). What's the proper solution and understanding of same?
  3. O

    Creative joins, anything to keep in mind - "gotchas", etc?

    I can do this: Select * from Table1 Left join ( table2 inner join table3 on blah blah ) on table[2 or 3].column = table1.column It can be a handy way to left join to 2 tables that, themselves, almost-always/always need to be inner joined to each other. Does anyone know of any "gotchas" -...
Top Bottom