@dwah wrote: The code seemed to work but im getting a teradata error. This issue might no longer be related to the query in itself but i'm not sure either. ERROR: Teradata insert: Response limit exceeded.
Oh, your table(s) are in Teradata. That makes a difference.
I'd be using explicit pass-through SQL and then use a Teradata SQL MERGE. If your source table is in SAS and not already Teradata then I'd upload this table first into the database - either into a staging area or then as a temporary table.
... View more