cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ykumar03
Frequent Visitor

How to Automate comparison of result set of same Sql query running on different oracle environment .

For eg.I have below SQL query which needs to be run  2 times . First time in a test environment and the second time in the Production environment with different credentials.

 

Select name,location from EMP where empid in(101,102)

 

After running the query in Test and Prod Oracle environment.

1.I want to compare the query result from both environments. How many records match/mismatch

2.Empid in Where condition of SQL query should be parametrized. means empid in where conditions should not be hardcoded.At run time I can put any empid.

 

Is there a way in Power bi by which I can setup/save this configuration and just by one click I can run this?

@Anonymous

 

1 ACCEPTED SOLUTION
PaulDBrown
Super User II
Super User II

Not exactly sure what you mean "run this by just one click"

However...

If you import both sets of data, you can compare them using measures:

Common records = COUNTROWS(INTERSECT(Table 1, Table 2))

 

differing records table 1 = COUNTROWS(EXCEPT(Table 1, Table 2))

 

differing records table 2 = COUNTROWS(EXCEPT(Table 2, Table 1))





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

2 REPLIES 2
ykumar03
Frequent Visitor

Thank You

PaulDBrown
Super User II
Super User II

Not exactly sure what you mean "run this by just one click"

However...

If you import both sets of data, you can compare them using measures:

Common records = COUNTROWS(INTERSECT(Table 1, Table 2))

 

differing records table 1 = COUNTROWS(EXCEPT(Table 1, Table 2))

 

differing records table 2 = COUNTROWS(EXCEPT(Table 2, Table 1))





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Top Kudoed Authors