Show rows with difference between tables.
Hi all,
I've got two tables:
Table 1 has a total count of 6784
Table 2 has a total count of 6156
The differnce between the two are 628 rows.
I'm trying to find the rows that are different between the two (i.e. the 628). RIght now, I've only got the counts.
select count(*) from (
select * from Table1
minus
select * from Table2
union all
select count(*) from (
select * from Table 2
minus
select * from Table1
1. 769
2. 141
I've tried:
select * from (
select * from Table1
minus
select * from Table2
union all
select count(*) from (
select * from Table 2
minus
select * from Table1
But that shows the two differences together. 910 rows.
How can I isolate those 628 rows in one result, that are different between the two?
Thanks.
Hi,
we5inelgr wrote:
Thanks for all the replies and sorry it wasn't clear initially and I'm not sure this will help much but what I'm looking for are the rows (the actual data, not the cournts) from this count result:
select count(*) from (
select * from Table1
minus
select * from Table2
union all
select count(*) from (
select * from Table 2
minus
select * from Table1
1. 769
2. 141
but just the 628 rows, not the 769 rows and/or the 141 rows. only the 628 rows that are the difference between the two.
Table 1 is a test table that was updated with some new data. Table 2 is a "model office" table. I need to show which rows are different between the two (the 628 rows). The other 6156 rows are identicle between the two tables.
Not quite. If the other 6156 rows were identical, then the query abouve would be producing
628
0
but it's not; it's producing
769
141
As Jonathan explained, there are 769 rows that are in Table1 but not in Table2.
Why do you want to see only 628 of them? Which 628 do you want to see? Why do you want to see that set of 628, and not some other set of 628?
Let's use a concrete example. Say both tables consist of a single column, p_key.
Table1.has 6784 rows, where p_key contains the integers 1 through 6784.
Table2 has 6156 rows, where p_key contains the integers 770 trhough 6925.
What are the results you want to see? Why do you want to see them, and not some other results? For example, if you say "I want to see the numbers 1 through 628". why those numbers? P_key=629 is present in table1, but missing in table2, just like p_key=628 is. Why do you want to see p_key=628 but not p_key=629?
Similar Messages
-
Hello,
We are creating a cross tab report, with products as the columns, and relationship managers with direct and shared revenue displayed across the rows.
For Eg
Relationship Manager Coverage Product1 Product2 Product3 Product4
Bob Direct 100, 0, 35, 50
Shared 0, 0, 15, 0
Alex Direct 15, 25, 40, 10
Shared 5, 0, 5, 0
George Direct 0, 0, 0, 30
Shared 0, 0, 0, 5
The problem lies when either one of the products has no values, or one of the relationship managers has no direct or shared revenues. If one of the products has no revenues, it disappears, and also when one of the RMs has no direct or shared revenues, the Direct or Shared row disappears.
I have tried to create a second query just included the Coverage variable, and using this variable in Query 2 with the RM variable from query 1, along with checking the "Show Rows with Empty Measure values", "Show Rows with Empty Dimension Values" and "Show when empty", but it still does not appear to work.
It only shows rows with values in them, and shows the rows with empty values at the end with no RM.
I have not tried to solve for empty columns yet.
Help with this would be much appreciated!!!!!!!!
Thank youHi ,
I think you can resolve this issue following ways ,
you need create another query ( Ex :Qauery2 ) add Product object and RM (Direct,shared) object only without conation. So now query2 result wil have all product and RM(Direct,shared).
Merge the Product object and RM between query1 and query2
Now create table using Product and RM from query2 and measure value from query1. Now you will get row even there is no data.
If you want try this sample report using efasion unvierse.
1) Add year ,state and Discount objects and apply condition Year Not in list "2004" and state Not in list "California "
2) run this query and create the cross tab table . Now you will not get 2004 column and California row in table.
3) Create query2 add Year and State only without any condition , run the query. Now query 2 will display all state and year .
4) Merge the column Year and State between query1 and query2
4) Create the cross table ussing Year and state from query2 and Discount from Query1
Now cross table will show 2004 and California ,even there is not in query 1.
I hope this will help you.
Ponnarasu
Edited by: ponnarasuk on Dec 7, 2011 12:48 PM -
What is exact difference between table and template in script
hello all
what is exact difference between table and template in scriptHi there.
Tables alow you to achieve more complex flows with internal tables. You can use different types os lines, like footer, header, line items, and differente types of line items. Also, and most important, you have different processing blocks, again header block (processed before processing of first row), body block (rows) and footer block (after last row or page break).
If you don't need any of this, use a template inside a loop to achieve something like a table. I personaly use templates only to draw lines, for example, before and after a loop, or to align some header in my documents.
A table, is a loop and template mixed to become a very good tool.
Regards.
Valter Oliveira.
Edited by: Valter Oliveira on Jun 5, 2008 5:10 PM -
Hi guru's what is the difference between table and temlate in smartforms
hi guru's what is the difference between table and temlate in smartforms
Hi Vasu,
Template is used for proper allignment of data which table is used for displaying multiple data.
We can say Template is for static data and Table is for dynamic data.
Suppose we have a requirement in which we have to allign the customer address in such a way as shown below:-
Name- Vasu Company- WIPRO Location- Chennai
Desig- S/W Native - Mumbai
Then for proper allighnment we can create a template and split that into 3 columns and 2 rows and create text elements for each cell display a proper allighned data at the output.
When we include a template inside a loop it gives the same property as a table.
When we have mutiple data which is to be extended to the next page like when we display all employee details in a company we use table.
Table has 3 sections , HEADER, ITEM ,FOOTER
The header secntion will be executed once and it will loop at the item level. at the end footer will be executed.
Hope this gives u some idea..
<b>Please reward if useful</b>
Regards,
sunil kairam. -
Query on differences between table Icons and types in smartforms
Hello,
I have a question regarding the apparent differences between tables in smartforms.
I have noticed on some of the default smartforms that are supplied the table icon is the same as on the
'Create new session' button at the top of a Sap session window. The icon on a table that I am currently working on is like a 'spread sheet' design, a heading with columns, as shown in the current documentation. The way the two styles of tables work is different.
Is the difference down to the fact one was created in an older implementation of Sap?
The reason I ask is because the table I refered to initially, is easier when configuring cells.
Regards
Mike.Hello Karthik
Thanks for taking the time to reply to my question.
The difference in the icons but with essentially the same function has always confused me since starting Smartforms.
Thank you for enlightening me.
I asked the question because the Complex node has a feature that I could have used. I have managed though to solve my problem using a table node.
Ten points awarded.
Best Regards
Mike Spear. -
Difference between table CKMLKEPH and transaction figure of CKM3
Hi Gurus,
Having an issue in material ledger transaction and table data.
There is a difference between table CKMLKEPH and transaction figure of CKM3 for couple of periods.
Single level price difference for raw material domestic figure coming in transaction CKM3 is not matching with CKMLKEPH table.
Can you advice the tentative reason of it.
Thanks in advance,
MC.Hi MC,
MLHELP_CCS_CONS_CHECK which check the actual CCS and the program
MLHELP_SPRICE_CCS_INIT for the standard CCS.
These programs are provided by the ML Helpdesk tool via note 364368.
Although these reports are used by SAP Support you can execute them in
test mode to verify your CCS data.
Regards,Declan -
Difference between table and advanced table
hi
what is the main difference between table and advanced table ?
What are the usages of both the Beans?Hi
OAAdvancedTableBean extends OATableBean to provide declarative support for existing table features that previously required programmatic control.
OAAdvancedTableBean also provides declarative support for features not available with OATableBean, such as column span in a table column header. Oracle recommend new tables be implemented as "advanced tables"...
Please Read more info from Jdev Guide..
Thanks
AJ -
Difference between table and tenplate?
Hi
What is a difference between table and a template?
Thanksare you refering to Smartforms?
Well in SF, table is something that contains data. Tables could be dynamic.
Template is a fixed format. Example if you have a invoice and the format is fixed with several vertical and horizontal lines. And you have terms and condition to be printed at the bottom. And the total amount.
Now this template will be printed in the form even if there are line items and even if htere is no line items. -
Difference between Table and Table Type
Hi
Can you please let me know the
Difference between Table and Table Type and
Difference between Structure and Table Type?
Regards,
Sreehi,
table is a data dictionary object in sap. table is of different types
1. transparent tables
2. pool tables
3. cluster tables
table type gives option for u to select different types of internal tables. they r
1. standard table
2. sorted table
3. hash table
Structures :
-Defined like a table and can then be addressed from ABAP programs.
-Structures contain data only during the runtime of a program.
-Just like user-defined data type.
- they are not present in database server and only on application server.
if helpful reward some points.
with regards,
Suresh Aluri. -
Difference between Table and Container
Hi,
Whats the difference between table and container.
How to create container in smartform.
Cheers
SenthilHi,
I have a requirement to remove a column from an existing container. I removed a column, but still the column showing up.. so I decided to recreate the container again. But I can create only table. How to make this as container.
Cheers
Senthil -
What is difference between table space and shchema
what is difference between table space and shchema ?
784633 wrote:
so each user has it own space of tables - schema ?yes, but let's clarify a bit ....
The "schema" is the collection of all objects owned by a particular user. So if user SCOTT creates two tables, EMP and DEPT, and a view EMP_RPT, and a procedure GET_MY_EMP, those objects (tables, views, procedures) collectively make up the SCOTT schema.
Those objects will be physically stored in a tablespace.
A tablespace is a named collection of data files. So tablespace USERS will be made up of one or more data files. A specific datafile can belong to one and only one tablespace. If a tablespace has more than one data file, oracle will manage those files as a collection invisible to the application - much like the OS or disk subsystem handles striping across multiple physical disks.
A specific object in the SCOTT schema can exist in only one tablespace, but not all objects of the schema have to be in the same tablespace. Likewise a tablespace can contain objects from multiple schemas.
and can one user to access tables of other users?As others have said - FRED can access tables belonging to SCOTT as long has SCOTT has granted that access to FRED. -
What is the difference between Table & Tablespace Fragmentation
What is the difference between Table Fragmentation & Tablespace Fragmentation.
What causes Table Fragmentation and what cause Tablespace Fragmentation.
How can we avoid Table Fragmentation & Tablespace Fragmentation.
How can we fix already Fragmented Tables & Fragmented Tablespaces
Thanks
NaveenUnless you are using an exceptionally old version of Oracle or are still using dictionary managed tablespaces or are using some interesting definitions of "fragmentation", fragmentation is practically impossible in Oracle.
Justin -
In smart forms-- difference between table and template
can you please tell me what is the difference between table and template in smart forms,
and als give me some object developed in smart forms.it is not recommended because, when ever we activate the smartform it generates one function module.
if we transport that driver program and smartform to testing or production, in that server the generated function module name will be differ.
hope u got it.
for this we need to use these function modules.
SSF_FUNCTION_MODULE_NAME
FM_NAME
regards.
santhosh reddy
reward if useful
Edited by: Santhosh Reddy on Feb 16, 2008 7:52 PM -
Discrepancy with size between tables..strange..
hey there,
i'm building a header, and i have two tables, one on top of
another. now, in dreamweaver..the space between these two tables is
nil, but when i do a preview, there seems to be a bunch of space
between the two elements (the element on top is an image and the
element on the bottom is typed text, both are within tables). now,
what i don't understand, is how can there be extra space in the
browser when the two tables are slammed against each other in the
program and they look really close together in the program?!? how
do i fix this? and this isn't just some 'little' space..the space
in the internet browser is too noticeable, but it looks great in
DW.
help..<!--DWLayoutTable-->
In my opinion, there are three serious problems with Layout
Mode -
1. Perhaps most importantly, it sits between you and *real*
HTML tables,
and fools you into believing that concepts like "layout cell"
and
"autostretch" really mean something. They do not. As long as
you use
Layout Mode, you'll never learn one of the most important
things for new web
developers - how to build solid and reliable tables.
2. Actually, #1 wouldn't be *so* bad, except that the code
that is written
by Layout Mode is really poor code. For example, a layout
table contains
MANY empty rows of cells. This can contribute to a table's
instability.
In addition, if your initial positioning of the table's cells
is a bit
complex,
Layout Mode will throw in col- and rowspans aplenty as it
merges and splits
cells willy-nillly to achieve the pixel-perfect layout you
have specified.
Again,
this is an extremely poor method for building stable tables,
because it
allows
changes in one tiny cell's shape (i.e, dimensions) to ripple
through the
rest
of the table, usually with unexpected and sometimes
disastrous consequences.
This is one of the primary reasons for the final result's
fragility - read
this -
http://apptools.com/rants/spans.php
3. The UI for Layout Mode is beyond confusing - many options
that you might
want to use are inaccessible, e.g., inserting another table,
or layer onto
the page.
I can understand the new user's desire to use this tool to
make their life
easier,
but the cost is just too heavy in my opinion.
To make good tables, keep it simple. Put a table on the page,
and begin to
load your content. If you would want a different table
layout, instead of
merging or splitting cells, consider stacking tables or
nesting simple
tables instead, respectively.
And above all, do not try to build the whole page with a
single table!
Luckily, Adobe understands the problems created for the
unsuspecting user
who falls into this trap, and has elected to remove this
feature altogether
from the next version of DW. The time is right for you to
begin working
with tables properly!
To read more about this approach, visit the DW FAQ link in my
sig, and run
through the table tutorials.
With regard to your specific problem -
<h1 class="style1"><img src="OrangeBackground.jpg"
width="558"
height="73"></h1>
Since the <h#> tags are intended to be used for
readable information, there
is really no reason to ever place them around just an image.
What you are
seeing is likely the margins around that <h1> tag. Try
removing it.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"chal7ds" <[email protected]> wrote in
message
news:[email protected]...
> i'm going to paste the code in here since my page isn't
that involved so
> far,
> and plus i don't have the
> ability to upload to the internet right now.
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"
> "
http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <title>mystery shoppers news</title>
> <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
> <script language="JavaScript"
type="text/JavaScript">
> <!--
> function MM_reloadPage(init) { //reloads the window if
Nav4 resized
> if (init==true) with (navigator) {if
>
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
> document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
> onresize=MM_reloadPage; }}
> else if (innerWidth!=document.MM_pgW ||
innerHeight!=document.MM_pgH)
> location.reload();
> }
> MM_reloadPage(true);
> //-->
> </script>
> <style type="text/css">
> <!--
> body {
> margin-top: 0px;
> margin-bottom: 0px;
> }
> .style1 {
> font-size: 36px;
> font-weight: bold;
> font-family: "Myriad Web Pro";
> color: #87A2CB;
> }
> .membershopperscom {
> font-family: "Myriad Web Pro";
> font-size: 36pt;
> font-style: normal;
> line-height: normal;
> font-weight: bold;
> font-variant: small-caps;
> color: #6F9ABA;
> text-decoration: overline;
> }
> .style2 {
> font-family: "Myriad Web Pro";
> font-weight: bold;
> font-style: italic;
> font-size: 18px;
> color: #FFFFFF;
> }
> -->
> </style>
> <link href="gradient.css" rel="stylesheet"
type="text/css">
> </head>
>
> <body>
> <table width="591" height="1698" border="3"
align="center" cellpadding="0"
> cellspacing="0" bordercolor="#6F9ABA">
> <!--DWLayoutTable-->
> <tr>
> <td width="583" height="99" valign="top"
bgcolor="#FDBD5C"><table
> width="100%" border="0" cellpadding="0" cellspacing="0"
bgcolor="#FDBD5C">
> <!--DWLayoutTable-->
> <tr>
> <td width="15" height="94"> </td>
> <td width="558" valign="top"><table
width="100%" border="0"
> cellpadding="0" cellspacing="0">
> <!--DWLayoutTable-->
> <tr>
> <td height="73" colspan="3" valign="top"
> bgcolor="#FDBD5C"><h1
> class="style1"><img src="OrangeBackground.jpg"
width="558"
> height="73"></h1></td>
> </tr>
> <tr>
> <td width="59" height="21"> </td>
> <td width="412" align="center"
valign="top"><span
> class="style2">Protecting and nuturing your credit
union brand.
> </span></td>
> <td width="87"> </td>
> </tr>
> <!--DWLayoutTable-->
> </table></td>
> <td width="11"> </td>
> </tr>
> <!--DWLayoutTable-->
>
> </table></td>
> </tr>
> <tr>
> <td height="1614" valign="top"><table
width="100%" border="0"
> cellpadding="0" cellspacing="0">
> <!--DWLayoutTable-->
> <tr>
> <td width="588" height="8" valign="top"> <img
> src="newsletterheaderbar1.jpg" width="583"
height="8"></td>
> </tr>
> <tr>
> <td height="1153"> </td>
> </tr>
> </table></td>
> </tr>
> </table>
>
> </body>
> </html>
> -
Difference between tables statement and by using type statement
Hi all,
I need to know the difference between the two of the below statements
Tables spfli.
and
data spfli type spfli with header line.
As far as i know both seem same to me.
Thanks in advance,
Bala.>
Bala Shanmuga Priyan wrote:
> Hi all,
>
> I need to know the difference between the two of the below statements
>
>
Tables spfli.
this will create a work area (spfli), looks like DB table spfli, but the statement is obsolate
Bala Shanmuga Priyan wrote:
>
data spfli type spfli with header line.
this will result in a syntax error, because this would also create a work area, but they cannot have header lines, so you should leave the WITH HEADER LINE addition.
To create work area use:
DATA : gw_spfli TYPE spfli.
To create internal table:
DATA : gt_spfli TYPE TABLE OF spfli.
Maybe you are looking for
-
Hello, we currently have a 9.2 database that is set up as Western European. We are upgrading to 10g and we now need to support unicode. I was planning on changing all the CHAR and VARCHAR2 data types to NCHAR and NVARCHAR2. I was also going to change
-
Which is the last version for iPhone 3G?,
I want to update an iPhone 3G and have no way to find other newer version than 4.2.1 is that the last one?
-
Hi, Hope someone can help me. Using Outlook 2003. Have BB Curve 8520, with T Mobile, and using Desktop Manager V 6.0 (recently downloaded/upgraded from V5.0). Can sync Contacts & Calendar OK, but unable to sync Tasks - get "connector error message" a
-
Hello, I have a problem, can you help me? I bought Lenovo Ideatab A2107A-F with Android 4.0.3 in Canada, and I need Russlian language pack for it, can I download somewhere Russian language? if you can not answer this question, tell me who to contact,
-
i have some videos on my ipod but when i click on "movies" tab under my ipod when it is connected to itunes, the videos aren't there. how can i see the videos in order to erase them?