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 gkittelson 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: *

  1. tommot82

    select intervals

    Guys this is brilliant, its not quite what i needed, but it is better than that because i had to go fix it and i learnt something! Thanks alot. Really appreciate it.
  2. tommot82

    select intervals

    sorry my query should have also included ID = 'foo1' SELECT ID, floor(rawdateandtime/900000)*900000 as flooredDate, rawdateandtime, Value FROM TBL1 WHERE ID = 'foo1' AND RawDateAndTime BETWEEN 1243810896000 AND 1243821696000
  3. tommot82

    select intervals

    ok below is a COMPLETE three hours of example data. If you were to run my original query against this it would return 12 rows, one for each of the 15 minute intervals between midnight and 02:59 (on the 01/06/2009). My problem occurs when one of these rows is missing, and i need to return some...
  4. tommot82

    select intervals

    makros: ah ok, i understand whats going on there now. Unfortunately the interval i have is a large interval spanning at least a day. Thankyou for your input though, it may well help me figure this out. bborissov: I understand your query (which is a miracle for me) and i see what you are trying...
  5. tommot82

    select intervals

    Thanks for the reply markros, I am trying to understand your query and i believe you are trying to output each id where a floored rawdateandtime value exists between the two given date values. however i think i have explained myself badly. What i meant was: supposing my table had rows...
  6. tommot82

    select intervals

    Hi, I am using a MSSQL database, and I am trying to select records from a db based on a 15 minute interval. The Date is recorded as a millisecond epoch time (stored as a numeric) which I round down to the nearest 15 minute window within the hour: SELECT ID, floor(rawdateandtime/900000)*900000...
  7. tommot82

    Select rows X-to Y

    ok thanks
  8. tommot82

    Select rows X-to Y

    to clarify i want a rolling range of 20 after i have ordered the rows.
  9. tommot82

    Select rows X-to Y

    Is there an easy way of returning specified rows that have no index column? I basically want to create a queries that only returns rows in blocks of 20 for example. any ideas?
  10. tommot82

    combingin two 'where' statements

    nice one thankyou very much!! Much appreciated
  11. tommot82

    combingin two 'where' statements

    Is there any neat way i can combine the following two statements to return me a single table of results with the columns: lt2, lt3, id select count(*) lt2,id FROM TABLE where Value<2 GROUP BY id select count(*) lt3,id FROM TABLE where Value<3 GROUP BY id Thanks for your help tommot82

Part and Inventory Search

Back
Top