comparing tables across databases sql refinement ideas required


Posted on 16th Feb 2014 07:03 pm by admin

Hi all

Via pl/sql I need to ensure that data between tables in different databases match (i.e. standby db and development db) I have made the following crude attempt.

SELECT COUNT(*) , SUM(weighted_sales), SUM(retail_value) FROM sales WHERE transaction_time_id = 5663 UNION SELECT COUNT(*), SUM(weighted_sales), SUM(retail_value) FROM sales@TOWARCHRTIBMPROD WHERE transaction_time_id = 5663

if rownumber > 1 then i know that the data for that day doesn't match.

However i don't like the sql i've used here and would like to improve upon it, any ideas? I thought perhaps using pivot to compare the data....

No comments posted yet

Your Answer:

Login to answer
270 Like 35 Dislike
Previous forums Next forums
Other forums

Firefox displaying PHP source code??
Currently testing a site thats almost built, am going to be including php on a sidebar on all pages

LSB (PHP 5.3) problem with static value!
hello,

i'm having a problem. static::$text variable gets lost at some point. can someone plea

Extra fields in main body and php required.
I'm new to PHP so please be gentle. I have a little php script below that works well.
The &quo

show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i

Apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

"From field" in PHP email form
I used a wizard to create a PHP email form. I was able to customize it with the exception of the Fr

Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if t

Module pool selction screen parameters combination logic
Hi floks,
Am new to the module pool development ,Recently i have created one program based on

My query is being run with no results.
I have this.

Code: function DropUser($duser_id, $user_email, $user_username) {

Help If user voted, block them
On my Prayer request site, i let users Click a button to Pray for somone that has posted a pray, i g

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash