Show differences between identical columns of two different tables

Hi,
I am trying to build an ADF UIX page that takes data from 2 tables. Both of these tables will have matching columns. The requirement is, I need to compare each of the columns within these tables and highlight the differences between the columns. For example, if table 1 has a column x with value 10 and table 2 has a column x with value 20, at runtime, I need to provide a text field for table 2's x column so that the user can change the value to match table 1 or enter a different value.
I need to do this using ADF UIX. Could anyone please help me in achieving this?
Thanks,
Ashok

hi
thw solution which you have given that is giving the
cartesian product of all the rows of the all the 3
tables.
1st table-7 rows
2nd table-7 rows
3rd table-7 rows
total rows in result table- 343 rows.
So its not working well..
thanks for ur response.What part of
You might also want a WHERE clause if the tables have more than one row in.did you have a problem with? You provided no information on which any of us could have written a join condition. I assumed you either had only the one row you showed us, or you were planning on coding the join yourself.

Similar Messages

  • To find Common data in 2 columns in two different tables.

    Hi,
    Could someone help me out with a querry to find out common data from 2 columns in two different tables??
    Thanks
    Rajesh

    966915 wrote:
    suppose i hav 2 tables
    Table A
    s.No name EID
    1 aaa 123
    2 bbb 234 ... etc..
    and Table B
    S.no salary eid location
    1 mmm$ 123 india
    2 ddd$ 556 Uk
    3 fff$ 236 US
    How do i select the common entry in both the tables??why do you post in forum for SQL & PL/SQL; yet never post anything in either language?
    what do you mean by "common enrty"?
    does every column value must match exactly across 2 rows in different table?

  • Sum two different columns from two different tables

    Can you select and sum two different columns, from two different tables in the same sql statement?
    i.e.
    table1
    Item----OnHand_Qty
    A--------10
    A--------15
    B--------10
    B--------10
    C--------20
    table2
    Item----Trx_Qty
    A--------2
    A--------4
    A--------6
    B--------1
    B--------1
    C--------4
    I'm looking for the following results from a query
    Item----Sum(Onhand_Qty)---Sum(Trx_Qty)
    A--------25

    Like this?
    SQL> create table table1 (item,onhand_qty)
      2  as
      3  select 'A', 10 from dual union all
      4  select 'A', 15 from dual union all
      5  select 'B', 10 from dual union all
      6  select 'B', 10 from dual union all
      7  select 'C', 20 from dual union all
      8  select 'D', 30 from dual
      9  /
    Tabel is aangemaakt.
    SQL> create table table2 (item, trx_qty)
      2  as
      3  select 'A', 2 from dual union all
      4  select 'A', 4 from dual union all
      5  select 'A', 6 from dual union all
      6  select 'B', 1 from dual union all
      7  select 'B', 1 from dual union all
      8  select 'C', 4 from dual union all
      9  select 'E', 3 from dual
    10  /
    Tabel is aangemaakt.
    SQL> select nvl(t1.item,t2.item) item
      2       , t1.sum_onhand_qty
      3       , t2.sum_trx_qty
      4    from ( select item, sum(onhand_qty) sum_onhand_qty
      5             from table1
      6            group by item
      7         ) t1
      8         full outer join
      9         ( select item, sum(trx_qty) sum_trx_qty
    10             from table2
    11            group by item
    12         ) t2
    13         on (t1.item = t2.item)
    14  /
    I SUM_ONHAND_QTY SUM_TRX_QTY
    A             25          12
    B             20           2
    C             20           4
    E                          3
    D             30
    5 rijen zijn geselecteerd.Regards,
    Rob.

  • What is difference between adjusting columns these two ways?

    Hi everyone,
    In my last post I learned that I could create a new Master Page that is designed as a 1-column format and apply it to the body pages I want to have as 1-column. (I have a doc that has 2-column formatted L and R master pages; only 1 page at the very end, the Study Guide, needs to be 1-column formatted).
    I recently learned from the Adobe lesson book that if I am in the body page that I want to change from a 2-col to a 1-column format, I can go Graphics>Object Properties and this brings up the Customize Text Frame window where I can change the number of columns to 1 and click set. I found this a lot easier than creating a new Master Page.
    What is the difference between applying a one-column design to one page using each of these methods, applying a 1-column master page versus just changing the number of columns as described above? Is one wrong or better than the other?
    Thank you for your help!!

    There are 3 basic* ways of obtaining a custom layout for specific pages:
    hack the local column layout
    apply a new master Page as a local override:
    Format > Page Layout > Master Page Usage > Use Master Page
    map the new MP in semi-automatically:
    Format > Page Layout > Apply Master Pages (AMP)
    1 & 2 are not stable. Unless it's a disconnected flow, adding or deleting text prior to that page can cause your special-needs text to re-flow onto a page with normal Left/Right layout (and unexpected text flowing onto your special layout).
    1 is also at risk from an update to the Left/Right MPs themselves.
    3 requires that some paragraph on the special-needs page have a unique format name (say, "Heading2_Single"). After you perform your first AMP, an UnstructMasterPageMaps table is created on Reference Page MasterPageMaps. Add the special para name, and the special MP name to it. Thereafter, AMP will make sure that text gets the page it needs.
    You can also perform an AMP during Update Book.
    It is not reliable in FM 7.x. I don't know about later versions.
    I always use technique #3, and perform a separate AMP as part of the pre-print workflow.
    * You can also fake the layout in some cases, on the normal page layout, by putting the special needs flow in a table or text frame within an anchored Frame. Anchor to an Across-All-Columns format as needed. It wouldn't be Framemaker if there weren't at least 5 ways of getting the same result .

  • About Olympus EP-1: ¿ Why Lightroom can't show difference between 2 RAW photos with different ISO?

    When I take RAW+JPG photos with my new Olympus PEN EP-1 which the unique difference is ISO and I import in Ligtroom:
    - I can see difference between JPG photos.
    - I can´t see any difference between RAW photos (In Olympus Master or Olympus Studio I can see difference). The problem is Ligtroom

    There are two sides to your question. I. should Lightroom read all embedded
    tags to a RAW file, and II. can it even technically do it.
    The problem is that all of tags such as this exposure compensation one,
    sharpening, picture styles, etc. are embedded in proprietary file formats
    that the manufacturers will not disclose the structure off. Adobe (and every
    other RAW converter out there that is not made by the camera manufacturer)
    has to hack into the file format to figure it out, so question II can be
    answered by "probably not" This is not Adobe's fault, but that of the camera
    manufacturers not using a standard RAW format. Interestingly, for camera
    manufacturers that use a standard format such as DNG (think LEICA for
    example), a lot of camera settings actually translate into Lightroom
    settings.
    For question I, you have to figure out where you draw the line. Which
    settings, on top of simply white balance (which Lightroom reads of course)
    should the program read and use? Myself I think the program should display
    the RAW data as accurately as possible. In the case of the "ISO bracketing"
    that is not really ISO bracketing, the RAW data did not change at all. The
    program should reflect this, if only to make the user realize that it is a
    useless experiment and only a waste of card space. That said, it would be
    nice if some settings translate, but that is made really hard due to the
    proprietary file format.
    >Would I expect Adobe implements how Olympus E-P1 works in next versions ?
    I doubt it, but maybe somebody at Adobe is adventurous enough to reverse
    engineer/hack your files to figure out where the compensation tag is stored,
    so you never know.
    This is however a very uncommon situation to encounter. Why would anyone
    bother ISO bracketing if the camera doesn't ISO bracket at all! You're
    better off just dialing in extra or less exposure in post. For me the
    advantages of LR over typically glacial and badly written manufacturer
    software is so large that small issues such as this do not begin to add up
    to an argument to change workflow. In the end that's all personal of
    course.

  • Contatenation of columns from two different tables

    Hi everyone
    i have one table in following desc
    table-1
    str q4_currrent Q4_target
    prd 500 1000
    Table-2
    q3_currrent Q4_target
    345 1000
    Table-3
    percentage
    50
    I want the result in this format---
    str q4_currrent Q4_target q3_currrent Q4_target percentage
    prd 500 1000 345 1000 50
    Can anyone help me how can i get this result? I want this to be done only with
    query not with any procedure or function.
    if you hav any query to concatenate the different tables please suggest.
    thanks.
    -Anand

    hi
    thw solution which you have given that is giving the
    cartesian product of all the rows of the all the 3
    tables.
    1st table-7 rows
    2nd table-7 rows
    3rd table-7 rows
    total rows in result table- 343 rows.
    So its not working well..
    thanks for ur response.What part of
    You might also want a WHERE clause if the tables have more than one row in.did you have a problem with? You provided no information on which any of us could have written a join condition. I assumed you either had only the one row you showed us, or you were planning on coding the join yourself.

  • Subtract sum of two columns in two different tables and display balance for each row

    Hello Friends,
    I have the below 5 tables
    1. STUDENT (STUDENT_ID, NAME)
    2. DEPARTMENT (DEPT_ID, NAME, CONTACT_PERSON, PHONE)
    3. SECTION (SECTION_ID,SNAME,DEPT_ID,Acad_LEVEL,SHIFT,TIME,ROOM)
    4. TUITION_BILL (Seq_No,  STUDENT_ID,  DEPT_ID,  Acad_Level,  SECTION_ID,  SEMESTER,  Acad_Year, BILL_DATE,  GROSS_AMT_DUE)
    5. TUITION_PAYMENT (Seq_No,RECEIPT_NO,STUDENT_ID,DEPT_ID,Acad_Level,SECTION_ID,SEMESTER,Acad_Year,SCHOLARSHIP,PAYMENT_DATE,PAYMENT_AMT,REFERENCE,REMARKS)
    I wrote the following query
    SELECT T.Seq_No,T.STUDENT_ID,S.NAME As STUDENT_NAME,d.name As DEPT,T.Acad_Level,c.SNAME As SECTION,
    T.SEMESTER,T.[Acad_Year],BILL_DATE,GROSS_AMT_DUE,
    COALESCE(SUM(T.GROSS_AMT_DUE),0)-COALESCE(SUM(PAY.PAYMENT_AMT),0)- COALESCE(SUM(PAY.SCHOLARSHIP),0) As BALANCE
    FROM TUITION_BILL T JOIN STUDENT S ON S.STUDENT_ID=T.STUDENT_ID join DEPARTMENT d on d.DEPT_ID=T.DEPT_ID
    join SECTION c on c.SECTION_ID=T.SECTION_ID LEFT JOIN (SELECT DISTINCT STUDENT_ID,COALESCE(SUM(p.PAYMENT_AMT),0) As PAYMENT_AMT,
    COALESCE(SUM(P.SCHOLARSHIP),0) As SCHOLARSHIP FROM TUITION_PAYMENT p GROUP BY p.STUDENT_ID) As PAY ON PAY.STUDENT_ID=T.STUDENT_ID
    WHERE s.STUDENT_ID='138218' GROUP BY T.Seq_No,T.STUDENT_ID,S.NAME,d.NAME,T.[Acad_Level],c.SNAME,T.SEMESTER,
    T.[Acad_Year],BILL_DATE,GROSS_AMT_DUE,PAYMENT_AMT,SCHOLARSHIP
    The above query shows the below output
    Seq_No
    STUDENT_ID
    STUDENT_NAME
    DEPT
    Acad_Level
    SECTION
    SEMESTER
    Acad_Year
    BILL_DATE
    GROSS_AMT_DUE
    BALANCE
    1
    138218
    Abdirahman Dhuh Gamadid
    Agriculture and Veterinary
    Year 2
    2A
    One
    2014-2015
    1/10/2014
    200
    0
    5638
    138218
    Abdirahman Dhuh Gamadid
    Agriculture and Veterinary
    Year 2
    2A
    Two
    2014-2015
    3/20/2015
    200
    0
    There are two records in the TUITION_BILL table with different Semesters and bill dates for the specified student_id and there is only one record in the TUITION_PAYMENT table which is the semester one payment record. Semester two payment record
    is not recorded yet and I want to display the balance like the following output instead of the above output.
    Seq_No
    STUDENT_ID
    STUDENT_NAME
    DEPT
    Acad_Level
    SECTION
    SEMESTER
    Acad_Year
    BILL_DATE
    GROSS_AMT_DUE
    BALANCE
    1
    138218
    Abdirahman Dhuh Gamadid
    Agriculture and Veterinary
    Year 2
    2A
    One
    2014-2015
    1/10/2014
    200
    0
    5638
    138218
    Abdirahman Dhuh Gamadid
    Agriculture and Veterinary
    Year 2
    2A
    Two
    2014-2015
    3/20/2015
    200
    200
    The above query is working fine but I'm facing only one problem with it which its showing 0 balance for both records instead of different balances like the above desired output.
    Please help me in getting the desired result.
    Any help would be appreciated.
    Thanks in advance,
    Mohamoud 

    Thanks a lot Pituach for your reply; below I posted the script for the database and table creation and inserting sample data into the tables.
    CREATE
    DATABASE TESTdb
    GO
    USE TESTdb
    CREATE
    TABLE [dbo].[STUDENT](
          [STUDENT_ID] [int]
    NOT NULL,
          [NAME] [varchar](40)
    NULL,
    PRIMARY
    KEY CLUSTERED
          [STUDENT_ID]
    ASC
    )WITH
    (PAD_INDEX 
    = OFF,
    STATISTICS_NORECOMPUTE 
    = OFF,
    IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS 
    = ON,
    ALLOW_PAGE_LOCKS  =
    ON)
    ON [PRIMARY]
    ON [PRIMARY]
    GO
    SET
    ANSI_PADDING OFF
    GO
    CREATE
    TABLE [dbo].[DEPARTMENT](
          [DEPT_ID] [int]
    IDENTITY(1,1)
    NOT NULL,
          [NAME] [varchar](30)
    NULL,
          [CONTACT_PERSON] [varchar](40)
    NULL,
          [PHONE] [int]
    NULL,
     CONSTRAINT [PK__DEPARTME__512A59AC03317E3D]
    PRIMARY KEY
    CLUSTERED
          [DEPT_ID]
    ASC
    )WITH
    (PAD_INDEX 
    = OFF,
    STATISTICS_NORECOMPUTE 
    = OFF,
    IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS 
    = ON,
    ALLOW_PAGE_LOCKS  =
    ON)
    ON [PRIMARY]
    ON [PRIMARY]
    GO
    SET
    ANSI_PADDING OFF
    GO
    CREATE
    TABLE [dbo].[SECTION](
          [SECTION_ID] [int]
    IDENTITY(1,1)
    NOT NULL,
          [SNAME] [varchar](40)
    NOT NULL,
          [DEPT_ID] [int]
    NOT NULL,
          [Acad_Level] [varchar](30)
    NULL,
          [SHIFT] [varchar](20)
    NULL,
          [TIME] [varchar](20)
    NULL,
          [ROOM] [varchar](20)
    NULL,
     CONSTRAINT [PK__SECTION__92F8069507020F21]
    PRIMARY KEY
    CLUSTERED
          [SECTION_ID]
    ASC,
          [DEPT_ID]
    ASC
    )WITH
    (PAD_INDEX 
    = OFF,
    STATISTICS_NORECOMPUTE 
    = OFF,
    IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS 
    = ON,
    ALLOW_PAGE_LOCKS  =
    ON)
    ON [PRIMARY]
    ON [PRIMARY]
    GO
    SET
    ANSI_PADDING OFF
    GO
    CREATE
    TABLE [dbo].[TUITION_BILL](
          [Seq_No] [int]
    IDENTITY(1,1)
    NOT NULL,
          [STUDENT_ID] [int]
    NOT NULL,
          [DEPT_ID] [int]
    NOT NULL,
          [Acad_Level] [varchar](50)
    NOT NULL,
          [SECTION_ID] [int]
    NOT NULL,
          [SEMESTER] [varchar](50)
    NOT NULL,
          [Acad_Year] [varchar](50)
    NOT NULL,
          [BILL_DATE] [date]
    NULL,
          [GROSS_AMT_DUE] [decimal](18, 2)
    NULL,
     CONSTRAINT [PK_TUITION_BILL]
    PRIMARY KEY
    CLUSTERED
          [STUDENT_ID]
    ASC,
          [DEPT_ID]
    ASC,
          [Acad_Level]
    ASC,
          [SEMESTER]
    ASC,
          [Acad_Year]
    ASC
    )WITH
    (PAD_INDEX 
    = OFF,
    STATISTICS_NORECOMPUTE 
    = OFF,
    IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS 
    = ON,
    ALLOW_PAGE_LOCKS  =
    ON)
    ON [PRIMARY]
    ON [PRIMARY]
    GO
    SET
    ANSI_PADDING OFF
    GO
    CREATE
    TABLE [dbo].[TUITION_PAYMENT](
          [Seq_No] [int]
    IDENTITY(1,1)
    NOT NULL,
          [RECEIPT_NO] [int]
    NOT NULL,
          [STUDENT_ID] [int]
    NOT NULL,
          [DEPT_ID] [int]
    NOT NULL,
          [Acad_Level] [varchar](50)
    NOT NULL,
          [SECTION_ID] [int]
    NOT NULL,
          [SEMESTER] [varchar](50)
    NOT NULL,
          [Acad_Year] [varchar](50)
    NOT NULL,
          [SCHOLARSHIP] [decimal](18, 2)
    NULL,
          [PAYMENT_DATE] [date]
    NULL,
          [PAYMENT_AMT] [decimal](18, 2)
    NULL,
          [REFERENCE] [varchar](50)
    NULL,
          [REMARKS] [varchar](max)
    NULL,
     CONSTRAINT [PK_TUITION_PAYMENT]
    PRIMARY KEY
    CLUSTERED
          [Seq_No]
    ASC
    )WITH
    (PAD_INDEX 
    = OFF,
    STATISTICS_NORECOMPUTE 
    = OFF,
    IGNORE_DUP_KEY =
    OFF, ALLOW_ROW_LOCKS 
    = ON,
    ALLOW_PAGE_LOCKS  =
    ON)
    ON [PRIMARY]
    ON [PRIMARY]
    GO
    SET
    ANSI_PADDING OFF
    GO
    USE TESTdb
    INSERT
    INTO STUDENT(STUDENT_ID,NAME)VALUES(138218,'Abdirahman
    Dhuh Gamadid')
    INSERT
    INTO DEPARTMENT(NAME,CONTACT_PERSON,PHONE)VALUES('Agriculture
    and Veterinary','Mohamoud Abdilahi','065')
    INSERT
    INTO SECTION(SNAME,DEPT_ID,Acad_Level,SHIFT,[TIME],ROOM)VALUES('2A',1,'Year
    2','Morning','8:00-10:00','Room 1')
    INSERT
    INTO TUITION_BILL(STUDENT_ID,DEPT_ID,Acad_Level,SECTION_ID,SEMESTER,Acad_Year,BILL_DATE,GROSS_AMT_DUE)
    VALUES(138218,1,'Year
    2',1,'One','2014-2015','2014-09-10',200.00)
    INSERT
    INTO TUITION_BILL(STUDENT_ID,DEPT_ID,Acad_Level,SECTION_ID,SEMESTER,Acad_Year,BILL_DATE,GROSS_AMT_DUE)
    VALUES(138218,1,'Year
    2',1,'Two','2014-2015','2015-01-10',200.00)
    INSERT
    INTO TUITION_PAYMENT(RECEIPT_NO,STUDENT_ID,DEPT_ID,Acad_Level,SECTION_ID,SEMESTER,Acad_Year,SCHOLARSHIP,
    PAYMENT_DATE,PAYMENT_AMT,REFERENCE,REMARKS)VALUES(1,138218,1,'Year
    2',1,'One','2014-2015',0.00,'2014-10-10',200.00,'N','N')

  • API for tools that show differences  between two file in applet

    I am searching Api for tools that show differences between two data file
    that represent as bytes[] in the memory in applet .
    the applet is not sign Applet.

    I gotta it.
    File f=new File("\\\\"+"Linshuaibing"+"\\card\\DSC00134.jpg");[Thank you very much v!

  • How to find difference in amount between two fields in two different tables

    Hi,
    I am new to PL/SQL. I need to write a procedure to calculate the difference between two columns of two seperate tables. For example:
    I have Table a and Table b. Both with two columns Id and Amount. I need to find the difference of Amount between table a and table b value for each record in table b, store it in variable and then do further operations using that difference. Kindly help me with this.

    Something like this?
    INSERT INTO table_c (id, diff, p_or_n)
    SELECT
    a.a_id,
    a.a_value - b.b_value
    DECODE( SIGN(a.a_value - b.b_value),
      1 , 'P',
      0 , 'P',
      -1, 'N'
    FROM table_a a JOIN table_b b
    ON (a.a_id = b.b_id);
    -- Ranit

  • ^How to show difference between sales in year 2009 and 2010

    Hi experts,
    I am facing a problem in a BEx Query. I have to show the difference between the sales of two years. Let me be more specific..
    I only have one keyfigure sales and only one characteristic year and I need the column difference.
    year      sales      difference
    2009      5000      -
    2010      8000      3000
    2011      9000      1000
    Please can anybody explain me how to get this.
    Many thanks in advance
    Peter

    Hi Peter
    There are various ways of getting the result you are going for.
    1. If you are 100% locked to the way the data has to be shown - you can use CELLS.
    a. start of making a strukture on year getting the years you need (in rows)
    b. generate a structure with 1 the key figure "sales" and second a formula which equals zero
    c. press Cells in your menubar and give all the combination of Sales and years a cell reference.
    d. Create formulas in the combination of year/Formula=0 and just make the formula this years sales - last years sales.
    This is a lot like Excel but also is'nt very handy for navigating and hence not a solution I normally would recomend
    If you are not on the other hand restricted to the way it has to look I would generate 3 columns with restricted key figures.
    1 with filter on Fiscal Year (0FISCYEAR) taking Current year and key figure sales
    2 With filter on Fiscal Year taking Current year and an offset of -1 and key figure sales
    3 Same and offset -2
    Last I would make 2 formulas giving me the differences.
    But as mentioned there are many ways of achieving your goal - maybe someone will have a better way
    Best Regards
    Xavier

  • To check the difference between 2 programs from 2 different clients

    standard program which you can use to compare difference between sources codes of 2 different programs

    Hi,
    use remote comparision to compare the program with two different clients..or use TCODE-SE39
    Regards,
    Nagaraj

  • I want to know the difference between Days column and Day1 Column

    Hi All,
    I used this query:
    SELECT to_char(return_date_time,'dd/mon/yyyy hh24:mi:ss') Test,
    DECODE ('I', 'I', DECODE (1, NULL, NULL, 0, NULL, SYSDATE + 1)) Days,
    DECODE ('I', 'I', SYSDATE + 1) Day1
    FROM fm_curr_locn
    WHERE patient_id = 'DU00002765'
    output: 
    Test
    Days
    Day1
    26/oct/2013 00:00:00
    26-OCT-13
    10/26/2013 3:06:59 PM
    I want to know the difference between Days column and Day1 column and why the days column didnt show the time
    Please anyone help.....
    Regards
    Shagar M

    Pleiadian wrote:
    It is the decode statement that is doing this.
    The format of decode is:
    decode(expression, search1, result1, search2, result2, searchn, resultn, default)
    All result fields must be of the same datatype and will be of the datatype of the first result (result1 in this example)
    In your example (the decode for the field Days) the first result is a NULL. I suspect (gurus? anyone?) that Oracle will use the varchar2 overload of the decode statement, and the date field will be converted to varchar2 using your NLS_DATE_FORMAT settings.
    In the second decode statment (Day1) the first result is of datatype date, so the result of the decode statement will be a date field (and will be parsed as such by your sql development tool)
    I agree, as NULL is the first result returned the datatype is undetermined, so Oracle is picking VARCHAR2 over others, and causing an implicit datatype conversion on the resultant date value, whereas the other which is returned as a date will use the local settings of the client tool being used.
    I can replicate the 'issue' in Toad, and it's rectified if we cast the first returned value of the decode statement...
    SELECT DECODE ('I', 'I', DECODE (1, NULL, CAST(NULL AS DATE), 0, NULL, SYSDATE + 1)) Days,
           DECODE ('I', 'I', SYSDATE + 1) Day1
    FROM dual

  • Concatenate columns from two different reports

    In OBIEE 11g report, I am looking for a method to concatenate columns from two different reports.
    My requirement is, if I show 'Units Produced' for customer A, I need to show another column 'Units Produced' for a related customer B.
    Every customer has one related customer.
    So my report shows all the data for customer A, but I need to add one column which is for custome B , so I am looking a way to concatenate columns or if some other way this can be done

    Customer A is dimension table. You mapped to fact to get Customer A details.
    Now you want for Customer B. Now create one more alias table for Customer and name it as customer B and join with Fact on Customer B keys and use it.
    Each customer has related customer.
    2 dimension tables one for customer and other for related customer.

  • How to Create a new column from two different result sets

    How to Create a new column from two different result sets, both the result set uses the different date dimensions.

    i got solutions for this is apply filters in column formula it self, based on the requirement.

  • How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column

    Please Help!!!
    How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column.
                                      January 2014         January
    2013                            +/-
                    Region   Entry   Exit  Total    Entry   Exit   Total   (Total of Jan2014-Total of Jan2013)
                    A               2         3      
    40        5       7        30                    40-30= 10

    What is a table structure? Sorry cannot test it right now..
    SELECT <columns>,(SELECT Total FROM tbl WHERE Y=2014)-(SELECT Total FROM tbl WHERE Y=2013)
    FROM tbl
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

Maybe you are looking for

  • New Macbook + 320gb WD = Problem

    Hi, i just got the new macbook 2ghz and bought a 320gb WD 5400/min hard drive. It works just fine except for the fact that it makes a sound every 5 - 30sec when the hdd is not in use. "clack" ... 5 sec ... "clack" ... 30 sec ... "clack" ... 10 sec ..

  • Linking to a specific SLIDING panel remotely

    I'm trying to link to a specific SLIDING panel (not a tabbed panel) from a remote link. I'm sure this can be done using SpryURLUtils.js as I've successfully achieved the result with tabbed panels. There's not as much online information on doing this

  • Cannot create dll with JNI

    hi all, i have a c++ coding for a softphone. I opened that file in vc++ and i'm able to create a .exe file from that. the .exe file is running fine( it is searching for the server and is getting registered there). now i wanted to add jni to it. so i

  • Master Collection CS6, Acrobat Pro X Ghost Install... (Mac)

    So you know when you do a ghost poo, as in you do a poo and when you check the toilet and it's not there, well that's what the CS6 Master Collection Installer is doing with Acrobat Pro on my Mac (OSX Mountain Lion). I run the installer and it says it

  • UCCE8 workflow problem

    Hello all,      I need to write system time for each call in some variable in Termination_Call_Detail. I use workflow groups for this, where i set the enterprise data action on answered event. I also added the variable in the layout list. In fact, pr