Home : Products : Hach WIMS : Interfaces : Hach WIMS Direct Server-Side Interface to Custom Q12368 LIMS : Documentation : Introduction : Source versions tested
Q12383 - INFO: Source versions tested

The interface was tested against data running on an Oracle 10g Express database, version 10.2.1, The data tested with was exported from an Oracle 10.2.1.

 

The query for source data is:

select m.USER_SAMPLEID, m.SAMPLE_TYPE min(TO_DATE(decode(nt.name,'COLLECTION DATE',nt.text_value), 'MM,DD,YYYY')) coldate, r.userstamp, m.sample_id, r.COMPONENT, min(decode(nt.name,'REFERENCE NO',nt.text_value)) sampleid, case when substr(r.text_value,1,1) = '<' and UPPER(r.UNITS) = 'UG/L' then '<' || TO_CHAR(TO_NUMBER(substr(r.text_value,2,16),'99999999D999999')/1000) when substr(r.text_value,1,1) <> '<' and UPPER(r.UNITS) = 'UG/L' then TO_CHAR(TO_NUMBER(substr(r.text_value,1,16),'99999999D999999')/1000) when substr(r.text_value,1,1) = '<' and UPPER(r.UNITS) <> 'UG/L' then '<' || TO_CHAR(substr(r.text_value,2,16)) else TO_CHAR(r.text_value) end as res, case when UPPER(r.UNITS) = 'UG/L' then 'MG/L' else UPPER(r.Units) end as UNITS, min(decode(nt.name,'SUBMITTER INITIALS', substr(nt.text_value,1,3))) Sampler, r.result_id, r.measure, r.entry_userid, to_char(r.entry_date, 'MM/DD/YYYY') as entrydate, to_char(r.entry_date, 'HH:MI:SS') as entrytime from SQLLIMS.nai_samples m, SQLLIMS.nai_results r, table (select atttributes from SQLLIMS.nai_samples where sample_id = m.sample_id) (+) nt where m.sample_id = r.sample_id and upper(r.condition) = 'APPROVED' and upper(r.status) = 'COMPLETE' and m.timestamp > '1-JAN-2005' and r.entry_date >=  TO_DATE('29-Jan-2010 12:00:00 AM', 'dd-Mon-yyyy HH:MI:SS AM')  and r.entry_date <  TO_DATE('29-Jan-2010 12:00:00 AM', 'dd-Mon-yyyy HH:MI:SS AM')  and upper(r.status) = 'COMPLETE' and upper(r.condition) = 'APPROVED' and upper(r.value_type) <> 'TIME'  group by m.USER_SAMPLEID, r.entry_date, r.component, r.text_value, r.units, r.userstamp, r.result_id, r.measure, r.entry_userid, m.sample_id

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 7/13/2009 4:10 PM.
Last Modified on 7/15/2010 3:00 PM.
Last Modified by No Author Name Available!.
Article has been viewed 2691 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article