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

Change log of Cost centre change in Plant maintenance order
Hi,
How to view Change log of Cost centre in Plant maintenance order. Not visible thru 'Docume

Giving the below syntax error
Dear Experts,

I have used 2 buttons in gui status as display and cjhange.When the user wi

browse folder only
hi,
is there a way i can browse or get the directory or folder only and not the file?
i just w

Extract text from string
Hi folks,

I have a string that looks like this:

aaaaaaaaaa:
bbbbbbbbbb (ccccccccc)

Exporting new records
Trying to figure out the best way to set this up.

People register my site.

Their prof

login and redirect
hello! can someone help me.. can you give me an idea.. I want to make a login page and redirects it

Custom list order
Hi there,

I have checked this tutorial and it's great till the point where I want to display

Function
How can I make this function that once you click the link in the code it takes you to a new page wit

Recognising Revenue daily
Hello.
Has anyone come across daily recognition of deferred income?
We want to implement R

how to use two buttons with php
hi i have one form. there are three fields which are to be filled by the user. and then there are tw

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