Hi, I'm having some issues with my if statements again, this time I'm in the data load editor attempting to flag if DATE3 is the same as either DATE1 or DATE2. What I think my problem is that DATE3 is from a different table than DATE1 and DATE2 so I get an error when I attempt to make the if-statement in either of their load locations.
if (DATE1 = DATE3, 1, 0) as NEW,
if (DATE2 = DATE3, 1, 0) as CLOSE
I convert them to dates just because they specify an en exact time of day, which makes the comparison unnecessarily precise.
You can use only one source table in a load statement (disregarding wildcard loads from files). You will first have to create a new table containing all the fields you need by joining the source tables.
I think the "unnecessarily precise" is the key here. Try
if (floor(DATE1) = floor(DATE3), 1, 0) ...
Edit: You were comparing timestamps before converting to the whole dates, and the timestamps are almost never equal. Next, the correct way of removing time part is to use floor() function. Date() function affetcs presentation not the actual values. The right way is