Re: Unique Primary Key Linked to Multiple Accounts

2023-11-13 Thread Adrian Klaver
On 11/13/23 10:14, Anthony Apollis wrote: I cant get distinct data, im tying to break up the insert into chunks and it does not help Statements without context will not yield answers. First and foremost you will need to define what you mean by distinct data? From the queries you show that is

Re: Unique Primary Key Linked to Multiple Accounts

2023-11-13 Thread Anthony Apollis
I cant get distinct data, im tying to break up the insert into chunks and it does not help On Mon, 13 Nov 2023 at 20:05, Adrian Klaver wrote: > On 11/13/23 09:54, Anthony Apollis wrote: > > Please reply to list also > Ccing list > > > Hi Adrian > > > > Yes, the Account number column(s) are not u

Re: Unique Primary Key Linked to Multiple Accounts

2023-11-13 Thread Adrian Klaver
On 11/13/23 09:54, Anthony Apollis wrote: Please reply to list also Ccing list Hi Adrian Yes, the Account number column(s) are not unique. I brought in the primary keys in both tables. If I enforce referential integrity on the dimension table, will this solve the issue? 1) Your original po

Re: Unique Primary Key Linked to Multiple Accounts

2023-11-13 Thread Adrian Klaver
On 11/13/23 08:45, Adrian Klaver wrote: On 11/12/23 23:02, Anthony Apollis wrote: Please advice. I brought in data from SAP and assigned unique primary key to the table: I joined it with a dimension table. Joining code fact."IMETA_ZTRB_MP$F_ZTBR_TA_BW"ASfact LEFTJOINdim."IMETA_BRACS_Mapp

Re: Unique Primary Key Linked to Multiple Accounts

2023-11-13 Thread Adrian Klaver
On 11/12/23 23:02, Anthony Apollis wrote: Please advice. I brought in data from SAP and assigned unique primary key to the table: I joined it with a dimension table. Joining code fact."IMETA_ZTRB_MP$F_ZTBR_TA_BW"ASfact LEFTJOINdim."IMETA_BRACS_Mapping"ASbracs_map ONfact."Account_Number"=b

Re: Unique Primary Key Linked to Multiple Accounts

2023-11-12 Thread David G. Johnston
On Monday, November 13, 2023, Anthony Apollis wrote: > > Please advice. > The subset of data you’ve chosen to show does not allow one to draw any conclusions. Look for the things that are different in the joined result - the things that are identical are mostly uninteresting when trying to figur

Unique Primary Key Linked to Multiple Accounts

2023-11-12 Thread Anthony Apollis
Please advice. I brought in data from SAP and assigned unique primary key to the table: [image: unique] CREATE TABLE IF NOT EXISTS fact."IMETA_ZTRB_MP$F_ZTBR_TA_BW" ( "ZTBR_TransactionCode" integer NOT NULL, "Company_Code" character varying COLLATE pg_catalog."default", "Posting_Perio