Re: Excel Source [24]] Error: System.Exception: SqlTruncateException: Numeric arithmetic causes

2024-02-28 Thread Anthony Apollis
Data in Excel On Wed, 28 Feb 2024 at 22:22, Anthony Apollis wrote: > Please assist. I am using SSIS to read data from an Excel sheet into > Postgres. I have increased the column size a few times, just cant seem to > get the data in. Getting errors relating to destination column size. &

Using a Conversion Table

2024-02-14 Thread Anthony Apollis
*I am trying to convert a column from ZAR Column " Amount_in_Company_Code_Currency" " to USD.* Table: CREATE TABLE IF NOT EXISTS system."IMETA_ZTRB_MP$F_ZTBR_TA_BW2" ( "Company_Code" character varying(255) COLLATE pg_catalog."default", "Posting_Period" integer, "Fiscal_Year" integer,

Check Code Correction Current Period Prior Period Movement

2023-11-23 Thread Anthony Apollis
Please assist me? I am trying to calculate Current Period Prior Period Movement from my data, the date columns are: [image: image.png] Please check my code for any errors, code runs, i just want to make sure it does what it's supposed to do. -- View: model.IMETA_ZTRB_BRACS_Model_TA_BW_View

Getting most records possibly from an Inner/Left Join

2023-11-19 Thread Anthony Apollis
For sample data in Excel see https://drive.google.com/file/d/17aOmG-Ynx-6U05wNNrHXJG7iywgCMiuy/view?usp=sharing (1) The fact table is from SAP. (2) Dimension Tables are named "B Masked". Please note that none of the tables had primary keys, I had to bring them in myself. In the Bracs Mapping tab

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 > > > >

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",

Calculating Days/Time(Are Loops Neccessary?)

2023-09-19 Thread Anthony Apollis
I have a table that needs to give me all data up until yesterday. This will be part of an SSIS package that runs monthly, a day before the last day. code is: -- Create the new table if it doesn't exist and insert data CREATE TABLE IF NOT EXISTS "model"."IMETA_ZTBR_BRACS_Model_TA_BW" AS SELECT

Ensuring Rifferential Integrity

2023-09-17 Thread Anthony Apollis
I brought in the Primary/Secondary/Foreign keys because it does not exist in the Fact/Dimension tables. The Fact tables contain 6 million records and the dimension tables are tiny. Because some columns don't exist in the Fact and Dimension table I can not update the Foreign Keys in the Fact

Re: Making Sure Primary and Secondary Keys Alligns

2023-09-13 Thread Anthony Apollis
t;Entity_ID"; -- Step 4: Re-add foreign key constraint for Entity ALTER TABLE system."IMETA_ZTRB_MP$F_ZTBR_TA_BW" ADD CONSTRAINT fk_entity FOREIGN KEY ("Entity_Secondary_Key") REFERENCES dim."IMETA_Entity_Mapping"("Entity_ID"); " Thank you! On Mon, 11 Se

Making Sure Primary and Secondary Keys Alligns

2023-09-11 Thread Anthony Apollis
Fact Table: -- 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" ( "ZTBR_TransactionCode" integer NOT NULL DEFAULT nextval('system."IMETA_ZTRB_MP$F_ZTBR_TA_BW_ZTBR_TransactionCode_seq"'::regclass), "Company_Code"

Only getting few records inserted from millions

2023-09-07 Thread Anthony Apollis
Please assist. I am retrieving data from SAP BW using SSIS. The data is loaded into: 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",

Loops and Case Statements Involving Dates

2023-08-21 Thread Anthony Apollis
*Please review my code and make recommendations where needed. I have this code: *``` NUMBER OF LOOPS FOR POSTGRESQL ETL: SELECT CASE WHEN (((EXTRACT(DAY FROM ((CASE WHEN (SELECT

Re: TSQL To Postgres - Unpivot/Union All

2023-07-20 Thread Anthony Apollis
table in SQLServer, but it does not have to be in Postgres. Thanks On Thu, 20 Jul 2023 at 16:51, Geoff Winkless wrote: > On Thu, 20 Jul 2023 at 15:28, Anthony Apollis > wrote: > > I am attaching my TSQL and Postgres SQL: > > You're still missing some CREATEs, for example fo

Fwd: TSQL To Postgres - Unpivot/Union All

2023-07-20 Thread Anthony Apollis
-- Forwarded message - From: Anthony Apollis Date: Thu, 20 Jul 2023 at 16:07 Subject: Re: TSQL To Postgres - Unpivot/Union All To: Geoff Winkless , David G. Johnston < david.g.johns...@gmail.com> I am attaching my TSQL and Postgres SQL: On Thu, 20 Jul 2023 at 15:58,

Postgres SQL

2023-07-19 Thread Anthony Apollis
Hi What list can i post sql related errors etc?