query result that doesnt make any sense | Ben Bimber | 2011-03-31 03:10 | |||||||||||||||||||||
Status: Closed | |||||||||||||||||||||||
Both my laptop and our test server are cloned from a postgres backup from our production server. they were taken at slightly different times, so they're not quite identical, but they're close. I have a query that runs fine locally, but is returning a completely confusing reuslt on test-ehr. The query attempts to identify the amount of blood drawn in the last 30 days for an animal: SELECT b.id, sum(b.quantity) as BloodLast30, count(*) as te, max(lsid) as lsid FROM study."Blood Draws" b WHERE b.id='r95061' AND b.date >= '2011-03-01' AND b.date <= '2011-03-31' GROUP BY b.id It should return a small number. Instead this returns 7380, which makes no sense. I added the count(*) and LSID to get more info. That query also says the LSID is: urn:lsid:primate.wisc.edu:Study.Data-108:1008.2.0110322E7.r95061.f593e0ef-370a-102e-803d-079f4fb02595 but when i try to find that: https://test-ehr.primate.wisc.edu:8443/labkey/query/WNPRC/EHR/executeQuery.view?schemaName=study&query.queryName=Blood%20Draws&query.Id~startswith=r95061&query.lsid~eq=urn:lsid:primate.wisc.edu:Study.Data-108:1008.2.0110322E7.r95061.f593e0ef-370a-102e-803d-079f4fb02595 that record doesnt exist. likewise for studydata: https://test-ehr.primate.wisc.edu:8443/labkey/query/WNPRC/EHR/executeQuery.view?schemaName=study&query.queryName=StudyData&query.Id~startswith=r95061&query.lsid~eq=urn:lsid:primate.wisc.edu:Study.Data-108:1008.2.0110322E7.r95061.f593e0ef-370a-102e-803d-079f4fb02595 any idea what could be happening here? thanks for the help. |
|||||||||||||||||||||||
| |||||||||||||||||||||||