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

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

text box alphanumeric caracters only
hi all!

I have search on google on how to enter in a test box only caracters A-Z,a-z,0-9 usi

Hi, explode and strstr.
Hi, I seem to be confused about the strstr function, eg. i have a string like:
"a.b.c.d.e.f&

Xml parsing
I need a suggestion about parsing xml with multiply parts like pervious...
i.e. different device

Paypal
Hi all,

I have an advanced basic knowledge of php

I want to try something new for a s

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

Open link with largest int string first
I have the following links i would like to open either all at once or one-by-one. How would i procee

Filename and Line Number Custom Error
I have a class, with a method that accepts 2 parameters. I would like to output error messages.

some query on multilingual website
Hi all,

Which is the simplest and easiest method to make a website multilingual,
is it put

Problems with returning true or false in eval()'d code
Hi guys,

Would appreciate some help with a problem when running eval() on a function that sho

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