Cant seem to find join problem

From: Anthony Apollis <anthony(dot)apollis(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Cant seem to find join problem
Date: 2023-09-10 18:22:28
Message-ID: CAJyMCY+esZcUb+_1A8AQETEaKGP1ZqE7Wug032pLGp5ZK7-2VQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I am trying to join these two tables using Left Join. Only got columns for
the Fact table and nothing for the dimension table(s), which I did before.
Using columns: Entity_Secondary_Key in system."IMETA_ZTRB_MP$F_ZTBR_TA_BW"
and Direct_Primary_Key in dim."IMETA_Direct_Indirect_Mapping_New"

left join -- Table: system.IMETA_ZTRB_MP$F_ZTBR_TA_BW -- DROP TABLE IF
EXISTS system."IMETA_ZTRB_MP$F_ZTBR_TA_BW"; CREATE TABLE IF NOT EXISTS
system."IMETA_ZTRB_MP$F_ZTBR_TA_BW" ( "Company_Code" character varying(4)
COLLATE pg_catalog."default", "Posting_Period" character varying(7) COLLATE
pg_catalog."default", "Fiscal_Year" character varying(4) COLLATE
pg_catalog."default", "Profit_Center" character varying(255) COLLATE
pg_catalog."default", "Account_Number" character varying(255) COLLATE
pg_catalog."default", "Business_Process" character varying(255) COLLATE
pg_catalog."default", "Cost_Center" character varying(10) COLLATE
pg_catalog."default", "Internal_Order" character varying(255) COLLATE
pg_catalog."default", "Trading_Partner" character varying(255) COLLATE
pg_catalog."default", "Amount_in_company_code_currency" numeric(17,2),
"Company_code_currency" character varying(5) COLLATE pg_catalog."default",
"BRACS_FA" character varying(255) COLLATE pg_catalog."default",
"Expense_Type" character varying(255) COLLATE pg_catalog."default",
"BRACS_ACCT_Key" character varying(255) COLLATE pg_catalog."default",
"CC_Direct" character varying(255) COLLATE pg_catalog."default",
"Segment_PC" character varying(255) COLLATE pg_catalog."default",
"CC_Master_FA" character varying(255) COLLATE pg_catalog."default",
"RowInsertedTimestamp" date DEFAULT CURRENT_DATE, "RowUpdatedTimestamp"
timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
"IMETA_ZTBR_BRACS_Primary_Key" integer NOT NULL DEFAULT
nextval('system."IMETA_ZTBR_BRACS_Primary_Key_seq"'::regclass),
"Entity_Secondary_Key" integer DEFAULT
nextval('system."Entity_Secondary_Key_seq"'::regclass), CONSTRAINT
"IMETA_ZTRB_MP$F_ZTBR_TA_BW_pkey" PRIMARY KEY
("IMETA_ZTBR_BRACS_Primary_Key"), CONSTRAINT "Entity_Secondary_Key_unique"
UNIQUE ("Entity_Secondary_Key") ) TABLESPACE pg_default; ALTER TABLE IF
EXISTS system."IMETA_ZTRB_MP$F_ZTBR_TA_BW" OWNER to ; with -- Table:
dim.IMETA_Direct_Indirect_Mapping_New -- DROP TABLE IF EXISTS
dim."IMETA_Direct_Indirect_Mapping_New"; CREATE TABLE IF NOT EXISTS
dim."IMETA_Direct_Indirect_Mapping_New" ( "BRACS Account Description"
character varying(255) COLLATE pg_catalog."default", "CLASSIFICATION"
character varying(255) COLLATE pg_catalog."default", "Direct_Secondary_Key"
integer NOT NULL, "Direct_Primary_Key" integer NOT NULL DEFAULT
nextval('dim."IMETA_Direct_Indirect_Mapping_New_New_Direct_Primary_Key_seq"'::regclass),
CONSTRAINT "IMETA_Direct_Indirect_Mapping_New_pkey" PRIMARY KEY
("Direct_Primary_Key") ) TABLESPACE pg_default; ALTER TABLE IF EXISTS
dim."IMETA_Direct_Indirect_Mapping_New" OWNER to find join columns

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Dan Smith 2023-09-10 18:52:17 Re: Cant seem to find join problem
Previous Message Daulat 2023-09-08 07:12:37 Re: DBLINK Error