My Teradata SQL has a volatile query that I was able to mimic in Alteryx. I am having trouble UPDATING the data using information from another table. I can join OK, but not sure how to make sure the date range in join from DATA_Orig (previously my volatile table) is withn the NewDataUpdate date range nor how to restrict in the join to UPDATE only those that have a rating and are not in CA:
UPDATE DATA_Orig
FROM NewDataUpdate ND
SET Rating = ND.Rating
WHERE
Provider = ND.Provider
AND ST_CDE = ND.State
AND serviced_dte BETWEEN ND.eff_dt AND ND.end_dt
AND St_CDE NOT IN ( 'CA')
AND ND.Rating <> 0 ;
I tried joining then removing cartesian product via dates but that did not work and did not seem efficient. This is my first community question and I am hoping question clear enought. Thanks in advance.