Home : Products : Hach WIMS : Interfaces : Hach WIMS Direct Server-Side Interface to ATL Sample Master LIMS : Documentation : Topics specific to the operation of this interface : Source Data Examples for interface Q12367
Q13883 - INFO: Source Data Examples for interface Q12367

Example Sample Master Oracle 10g Source data

The following query is used when the Orders Table Included field is UNCHECKED.  Please note, example show table owner as SMXPSU, you will need to adjust depending on your configuration.   

SELECT o.site as LOCCode, r.param as ACode, o.matrix as matrix, r.result as Result, o.collectdate as COLDate,
r.Qualifier as DataQualifier, r.samplenumber as SampleNumber, r.units as Units
FROM SMXPSU.results r, SMXPSU.orderdetails o
WHERE o.samplenumber=r.samplenumber and r.resultstatus=3
AND r.result is not null and o.site is not null
AND r.approveddate> TO_DATE('16-Apr-2012 12:00:00 AM', 'dd-Mon-yyyy HH:MI:SS AM') 
AND r.approveddate< TO_DATE('19-Apr-2012 12:25:00 PM', 'dd-Mon-yyyy HH:MI:SS AM') 
ORDER BY o.collectdate

 

The following query is used when the Orders Table Included field is CHECKED. 

SELECT o.site as LOCCode, r.param as ACode, o.matrix as matrix, d.projectID as projectID,
r.result as Result, o.collectdate as COLDate, r.Qualifier as DataQualifier, r.samplenumber as SampleNumber, r.units as Units
FROM SMXPSU.results r, SMXPSU.orderdetails o
LEFT OUTER JOIN SMXPSU.orders d ON o.orderid=d.orderid
WHERE o.samplenumber=r.samplenumber and r.resultstatus=3 and r.result is not null and o.site is not null
AND r.approveddate> TO_DATE('16-Apr-2012 12:00:00 AM', 'dd-Mon-yyyy HH:MI:SS AM') 
AND r.approveddate< TO_DATE('19-Apr-2012 12:25:00 PM', 'dd-Mon-yyyy HH:MI:SS AM') 
ORDER BY o.collectdate

NOTE: LEFT OUTER JOIN is NOT supported in Oracle 8, therefore if connecting to a Sample Master Oracle 8 database please contact Tech Support. 

 

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 4/19/2012 11:24 AM.
Last Modified on 4/19/2012 11:38 AM.
Last Modified by Scott Dorner.
Article has been viewed 2890 times.
Rated 5 out of 10 based on 1 vote.
Print Article
Email Article