-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Cédric Dutoit
committed
Oct 2, 2017
1 parent
3c1ca68
commit d45432f
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
RUN ON CRON 0,30 * * * * | ||
GIVEN COLLECTOR JDBC WITH url=jdbc:oracle:thin:@host:port/instance,user=myuser,password=mypass | ||
QUERY " | ||
select ( | ||
select count(*) from myschema.mytable table1 | ||
left outer join myschema.field1 pub on pub.myid = pub.myfk | ||
where field2=2 and field3=1 | ||
and pub.x_timestamp>trunc(sysdate) | ||
group by field1 | ||
) as MYVAL1,( | ||
select count(*) from myschema.mytable table1 | ||
left outer join myschema.field1 pub on pub.myid = pub.myfk | ||
where field2=2 and field3=3 | ||
and pub.x_timestamp>trunc(sysdate) | ||
group by field1 | ||
) as MYVAL2 from dual | ||
" | ||
THEN STORE VALUES |