Difference between two tables (ORA-01722)
I am trying to get the difference of two tables on two databases.Walker I run the script below, it gives me a result that is not accurate.
Select name, creation_time of v$datafile@REMOTE_database.comHowever, when I run this script, I get an accurate count of the difference. How can I list the exact number instead of only to count the difference? Want lists all five name missing on table 2.
2 LESS THAN
3 select name, creation_time from v$ datafile;
I get 14 ranks of foregoing.
SQL > SELECT a.cnt - b.cnt> count 2 (name) select cnt (of v$datafile@REMOTE_database.com) a, b
3 (select count (name) NTC v$ datafile);edited by: Albert Zaza on July 19, 2010 11:19
A.CNT - B. CNT
-----------
5
have you tried:
select trim(upper(name)) from v$datafile@REMOTE_database.com
MINUS
select trim(upper(name)) from v$datafile;
Tags: Database
Similar Questions
-
The most elegant way to get the difference between two tables - not least!
Hello
Simplified example of what I'm trying to achieve - I have two tables ORIGINAL and REVISED.
My aim is to compare the two, such as; -
When there is data in the two tables I get the difference between the Budget column, and if there is no difference, so I don't want no lines.
When data exists in the ORIGINAL, but not in review, I want to the inverse of the current value of the Budget column.
Where the data exist in REVISED I want the REVISED value.
I can see how I can do this, see below, but is there a more elegant solution?
Data for the ORIGINAL table
Data for the REVISED tableselect '801040' entity, '2186' expense_type, 234000 budget from dual union all select '801040' entity, '3001' expense_type, 1000 budget from dual union all select '801040' entity, 'P132' expense_type, 34000 budget from dual union all select '801040' entity, 'P135' expense_type, 43000 budget from dual
Desired outputselect '801040' entity, '2186' expense_type, 235000 budget from dual union all select '801040' entity, 'P132' expense_type, 34000 budget from dual union all select '801040' entity, 'P139' expense_type, 56000 budget from dual
ENTITY EXPENSE_TYPE DIFFERENCE
------ ------------ ----------
801040 2186 1000
801040 3001-1000
801040 P135-43000
801040 P139 56000
5 selected lines.
Code current to achieve this, is there a better way?
Thanks a lot for your comments,.select original.entity , original.expense_type , (nvl(revised.budget,0) - original.budget) as difference from original , revised where original.entity = revised.entity(+) and original.expense_type = revised.expense_type(+) and (nvl(revised.budget,0) - original.budget) != 0 union all select revised.entity , revised.expense_type , revised.budget as difference from revised where not exists (select 'x' from original where original.entity = revised.entity and original.expense_type = revised.expense_type) and revised.budget != 0
Robert.
Published by: Robert Angel on January 17, 2012 03:31 to change is not equal to! = - Thanks for the heads upSQL> with original 2 as 3 ( 4 select '801040' entity, '2186' expense_type, 234000 budget 5 from dual 6 union all 7 select '801040' entity, '3001' expense_type, 1000 budget 8 from dual 9 union all 10 select '801040' entity, 'P132' expense_type, 34000 budget 11 from dual 12 union all 13 select '801040' entity, 'P135' expense_type, 43000 budget 14 from dual 15 ) 16 , revised 17 as 18 ( 19 select '801040' entity, '2186' expense_type, 235000 budget 20 from dual 21 union all 22 select '801040' entity, 'P132' expense_type, 34000 budget 23 from dual 24 union all 25 select '801040' entity, 'P139' expense_type, 56000 budget 26 from dual 27 ) 28 select * 29 from ( 30 select nvl(o.entity, r.entity) entity, 31 nvl(o.expense_type, r.expense_type) expense_type, 32 nvl(r.budget,0) - nvl(o.budget,0) budget 33 from original o 34 full join revised r 35 on o.entity = r.entity 36 and o.expense_type = r.expense_type 37 ) 38 where budget <> 0 39 / ENTITY EXPE BUDGET ------ ---- ---------- 801040 2186 1000 801040 P135 -43000 801040 3001 -1000 801040 P139 56000 SQL>
-
Exact differences between two images
I need to be able to tell the difference between two images of a pastel artwork.
The first image is of the piece, to be hung on a wall or placed on a table.
The second is a photo of the piece after it has been moved, shaken or vibrated during which time particles were moved.
I tried superimposing the two images and see the difference between the layers. The images never seem to perfectly align along the lines of reference drawn in ink on the piece, and I do not understand the presentation of grayscale of the layer mode of difference. I would like to know if anyone has any photographic photoshopic, or insightful ideas on how to capture this specific detail of change. Another big challenge is now the images themselves to the exact distance and exposure to the room at the before and after photos, especially if they were taken in two different places on different dates.
Best I can think of is to load into Photoshop layers >, select the two layers and go Edit > auto alignment of layers. Then to the blending mode of the layer from the top to the difference.
You can test so that you know what to expect by opening an image and copy the layer of BG and setting the blending mode of the layer copied the difference. It will show as a pure black. Now make tiny changes to the upper layer.
-
Use a where clause clause if there is a relationship between two tables
Is it possible to use a where clause clause if there is a relationship between two tables.
I have a relationship between two tables:
And a.customer = b.customer (+)
If b.customer exists in a.customer I would add this in where clause
And b.info = 'X '.
But how?It's the outer joins by chance?
If so, why not just:
and b.customer(+) = a.customer and b.info(+) = 'X'
BTW, I put the two "b" on the left column to make it easier to read. Some people mix that makes me crazy, but makes no difference to the query.
-
Difference between two data aquistion
Hello
I got a data aquistion system that is supposed to keep data acquisition selection until the difference between two points a lot. For example, I get voltage (mv) as 2.31, 2.32, 2.34. 2.33 2.32, 2.33 2.32. the data up to a point, say 0.1V higher or lower than the first. Thewhole procss stop. Thank you for your suggestions.
Try this... (Labview 8.2)
-
difference between two dates in the year/month/day in Obiee
Hi gurus,
I know this question have been asked and answered several times but I have a requirement that is a little different, then the previous ones.
I want to calculate the difference between two dates in OBIEE10g in year/month/day format similar to the below SQL output
SQL > select end_date, start_date,
trunc (months_between (end_date, start_date) / 12) years.
months of mod (trunc (months_between (end_date, start_date)), 12).
End_date - add_months (start_date, trunc (months_between (end_date, start_date))) days
t
Thanks in advance
SK
Search for this
"TIMESTAMPDIFF IN THE FORM OF MTHS # YEARS."
or else
To get the current mandate of employees since the date of hiring in the form of # years # mths or # year (s) # month (s)
Concat (concat (cast (TIMESTAMPDIFF (SQL_TSI_Month, "Employee attributes". (((' ' Hiring last Date employee ", CURRENT_DATE) / 12 as char),"Year (s)"), concat (cast (MOD (TIMESTAMPDIFF (SQL_TSI_Month,"Employee attributes". (((((' ' Hiring last Date employee ", CURRENT_DATE), 12) as char), 'Month (s)'))
Concat (concat (CAST (TIMESTAMPDIFF (SQL_TSI_YEAR, "Employee attributes". (((' ' Hiring last Date employee ", CURRENT_DATE) as CHAR),"Year (s)"), concat (cast (MOD (TIMESTAMPDIFF (SQL_TSI_Month,"Employee attributes". (((((' ' Hiring last Date employee ", CURRENT_DATE), 12) as char), 'Mth (s)'))
-
difference between two timestamps
Hi gurus,
I have a procedure which has 2 input parameters of type timestamp. I need to find the difference between these two stamps and be converted to a timestamp and return. Help, please
Diifernce between two timestamps is interval. You can not convert the difference between two timestamp timestamp and it makes no sense. What you expect:
25/06/2014 11:25:37.524000 - 13:07:22.987654 20/06/2014
SY.
-
I got a prob while creating a link/link between two tables in a jdeveloper11g
Hi guys...
I got a prob while creating a link/link between two tables in a jdeveloper11g, help me.
I use two table employee, Department.
Unfortunately there is no primary key and foreign key in these tables.now i updated on those of table structure.
I want to create a form like it should be a link between the Department data, i.e. data and employee while the Department is changed then only present corresponding employees in this block...
Table structure as follows
Employee:
-------------------
employe_id,
name,
Department,
GR,
Date of birth
Department of justice
Department:
--------------------
department_id,
department_name;
Note: in the employee department table is the same as in the department table department_id...
So, you want to build master / detail between Department & sub_departments?
In the same way, create a new, yet another link between departments & sub_departments, so that the connection is:
Department.Department_Id = sub_departments.department_id
-
How do the time difference between two dates?
Hi all
I use this query to get the time difference between two dates.
Select to_timestamp ('2012-10-03 12:00 ',' YYYY-MM-DD hh)-to_timestamp ('2012-10-03 11:00 ',' YYYY-MM-DD hh) as double diff;
but do not get the correct result.
Thank youLeft KEY... Left Padding of tanks.
-
I am building a working method in LiveCycle, and I want to track how long the procedure takes. To do this, I have two time fields, and then a third time field to find the difference between two time fields. Looking at other posts to discussion, I could find a Javascript code that was part of what I wanted, but I can't get the third time field to display in the format I want. I tried to change the habits of the fields and that did not work. Could someone offer some advice on how to change the format or help me with the code? I couldn't figure to attach the actual file, but I have attached a picture of the PDF file and the Javascript code I used. If you look at the TimeIn (hh: mm) and time (hh: mm) areas (on the photo, I have attached), you will notice that the TotalTime comes out like HMM, and I want that it out as hh: mm.
Any help would be greatly appreciated!
Thank you
this.rawValue = (totalHrs > 9? String (totalHrs): '0' + String (totalHrs)) + ':' + (totalMins > 9? String (totalMins): '0' + String (totalMins));
-
I need to implement Drag N Drop between two tables that saves the two records
I need to implement Drag N Drop between two tables that saves the two records on a third page, using drag 'n drop.Check out this video http://baigsorcl.blogspot.com/2011/01/drag-and-drop-collection-in-oracle-adf.html
-
What is the difference between a table and a subform?
What is the difference between a table and a subform in LC forms? Please post your answers about the merits and demerits of using subforms instead of tables.
Hello
a table is simply a set of subforms with a particular role.
It is easier to handle the tables if they must be dynamic (add or remove lines, show or hide lines when page breaks appear etc..).
And Designers UI has some dialogue prepared in the object palette to simplify the settings of the tables.
For subforms, dialog boxes are more frequent, so you have yourself a little more script.
But at least you can do everything with subforms as you can do with tables.
The only one who is not very good with tables we work when you wrap arrays in other tables.
-
How to find the difference between two dates in the presentation layer
Hi gurus,
Hello to everyone. Today, I came with the new requirement.
I need to know the difference between a date and the current date in the formula column application presentation layer.by.
Thank you and best regards,
PratesHi Navin,
TIMESTAMPDIFF function first determines the timestamp component that corresponds to the specified interval setting. For example, SQL_TSI_DAY corresponds to the day component and SQL_TSI_MONTH corresponds to the component "month".
If you want to display the difference between two dates in days using SQL_TSI_DAY, unlike butterflies SQL_TSI_MONTH and so on...
hope you understand...
Award points and to close the debate, if your question is answered.
See you soon,.
Aravind -
two relationships between two tables
Hi all
I created a cube in my db (using OWB) of two relationships to my time dimension. A relationship shows the start time of a process, that the other represents the date of termination or end.
example of the cube:
Fact1
Fact2
Dim_Time1
Dim_Time2
where Dim_time1 and Dim_Time2 link to the same dimension.
Unfortunately I have trouble this manually import in obiee administrator. I imported the fact table and the dimension of the physical layer table. Can I move to the business layer and create the two joins between two tables. But the overall consistency check up a mistake, I shouldn't have two relationships between two tables and remove a foreign key.
What I am doing wrong?
Kind regards
KnutKnut,
In your example, you should have a time dimension in the phyiscal layer and alias of this 2 x, for Dim_time1 and for Dim_time2, in this way aliases are separate tables as the BI server point of view and you define releations separate on the same table, you can define specific to each alias dim relevant time joins.
In this way, you will have two time decreases intensity in MDB layer also, has 'Dim-Start Time' and a ' Sun - term time "or similar.
Hope this helps,
Alastair -
How to remove the extra space between two Table HTML
Hello
I wrote a code for printing costs. But there is more space between two Table Html, how I can remove it.
Please run that Code
Start
HTP.p (')
< html >
(< body > ');
HTP.p (')
< TABLE align = "left" width = "500" cellspacing = "0" cellpadding = "0" border = "1" >
< tr > < td align = 'right' white-space: nowrap; > Ph-2201751 < table >
< td > < table >
< /tr >
< tr > < td align = "center" white-space: nowrap; > < B > < table > < /B > SATYAM MODERN PUBLIC SCHOOL
< td > < table >
< /tr >
< b >
< td align = "center" white-space: nowrap; > < i > < H3 > (AFFILIATED to THE CBSC, NEW DELHI CODE No. 53544) < / H3 > < /I > < table >
< td > < table >
< /tr >
< tr > < td align = "center" white-space: nowrap; > new colony Braham, - 131001 (h) < table >
< td > < table >
< /tr >
< tr > < td align = "center" white-space: nowrap; > RECEPTION COSTS < table >
< td > < table >
< /tr >
< /table >
< TABLE width = "500" cellspacing = "0" cellpadding = "0" border = "1" >
< b >
< td width = "100" white-space: nowrap; > receipt no.: < table >
< td width = "100" white-space: nowrap; > Date received: < table >
< /tr >
< b >
< td width = "100" white-space: nowrap; > name: < table >
< td width = "100" white-space: nowrap; > father name: < table >
< /tr >
< b >
< td width = "100" white-space: nowrap; > class & s: < table >
< td width = "100" white-space: nowrap; > A/C No. : < table >
< /tr >
< b >
< td width = "100" white-space: nowrap; > from: < table >
< td width = "100" white-space: nowrap; > to: < table >
< /tr >
(< /table > ');
HTP.p (')
< / body >
(< / html > ');
end;
Thank you
EdHello
HTML is valid, that your code print?
Wouldn't be as below?
BR, Jari
Published by: jarola on December 18, 2009 15:22
I test your code
http://Apex.Oracle.com/pls/OTN/f?p=40323:25
I can't see any extra space between the tablesMaybe you are looking for
-
I tried to use my 3 recovery disks. When I get 19 seconds to complete on my 3rd drive, I get the error message "cannot open P:\GHOSTERR. TXT"then it says APP ERROR 437. My laptop is about 3 years old and it was was sluggish. This is the first time I
-
Satellite A100-new or old battery is not
HelloI have a Satellite A100 - 543 (PSAARE). The original battery was not charging so I bought a new. Now a new charge or the other. I then ordered a new charger before coming on this forum so I'll try that when it happens, but I think that the probl
-
Moving pictures of Android to iCloud
Hi all I'm in trouble! I'm eager to spend the Ms. of an android phone to an iPhone. She already has an iCloud account because it has an iPad. She has no computer/laptop. Move contacts and stuff to the iphone is of course quite simple by implementing
-
Do I have to organize a session of good connection FSX?
Hello dear: I live in Saudi Arabia, I have ADSL 1 Mb I can't host a green connection server! What is the problem? Where I need to start working on that? Best wishes.
-
Screenshot using touchscreen devices
Hello friends, I and requirement to capture the screenshot of blackberry. I can do this using the class net.rim.device.api.system.Display as follows: Bitmap screenBitmap=new Bitmap(Display.getWidth(),Display.getHeight()); Display.screenshot(screenBit
-