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

Sequencing or queuing parallel process
Scenario is as follows
There is one parent process say P1 and 4 child processes say A B C D

Map.php
I am a complete beginner to PHP and am looking for some help with a program I am messing around with

Problem assigning value to variable in "IF" function
Does this script makes sense? I am trying to take the value that is set to "authenticat" a

Displaying Multidimensional Arrays...about to put my head in a vice, PLEASE HELP
I am fairly new to PHP and MySQL and I have a problem which I have been trying to resolve for days.

cURL proxy
Okay here is the thing... i know how to add proxys

Code: curl_setopt($ch, CURLOPT_PROXYTYPE,

if statements problems
Hi. I'm trying to make a web form, but I kind of hit a dead end trying to figure out why it doesn't

PHP Form to Variable.
Hi! I have written a HTML-form code in DreamWeaver CS3 (in a PHP doc) and I really need it to work s

Syntax Help
I'm trying to make a form that edits a php file which contains config settings. I'm using strings t

how can i display php source code snippets ?
I am outputting some pho code .. and I want to display the source code so people can copy and paste

Is there something wrong?
Hi all,

Just a quick question... can someone look at this code and see if something is wrong?

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