Hi All,
Below is the x++ query I am using. I have two primary addresses for the same vendor, one is active
and one is outdated. I have to update only the active rows. In table this is how the data looks.
isPrimary accountnum VALIDTO
0 DAT-000001 2154-12-31 23:59:59.000
1 DAT-000001 2011-08-26 21:54:57.000
1 DAT-000001 2154-12-31 23:59:59.000
static void Job2(Args _args)
{
logisticslocationext a9;
DirPartyLocation a6;
LogisticsPostalAddress a8;
vendtable a2;
logisticslocation a7;
;
update_recordset a9
setting taxgroup = '' join
a6 where a6.LOCATION == a9.LOCATION && a6.ISPOSTALADDRESS == 1
join a8 where a8.LOCATION == a6.LOCATION
&& a8.ValidTo == str2DateTime("2154-12-31 23:59:59",321)
join a2 where a2.PARTY == a6.PARTY
join a7 where a7.RECID == a8.LOCATION && a7.RECID == a6.LOCATION && a7.RECID == a9.LOCATION;
}
When I run this job, it updates all the three records. I don't want to touch the one
with validto date as: 2011-08-26 21:54:57.000 as it is outdated
Not sure what is wrong with "a8.ValidTo == str2DateTime("2154-12-31 23:59:59",321)". Please suggest what might be going wrong.
Thanks,
Preeti
*This post is locked for comments
I have the same question (0)