G
Guest
I have two tables as follows:
workorderentity1
workorder,entityuid,entitytype,feature_id,feature_type...
and
Fbuilding1
objectid,facilityid...
I have setup the following update query.
UPDATE a_WORKORDERENTITY1 AS WE INNER JOIN sde_FBUILDING1 AS FB ON
WE.ENTITYUID = FB.FacilityID SET WE.FEATURE_ID = FB.OBJECTID
WHERE (((WE.ENTITYTYPE)="fbuilding") AND ((FB.OBJECTID)<>[WE].[FEATURE_ID]));
I expected that this query would copy the objectid value from sde_fbuilding1
to the feature_id field of the a_workorderentity1 table. However, what is
happening is the values are being swapped. The feature_id value is being
copied to the objectid field and the objectid value is being copied to the
feature_id field. Thus, each time I run the query it finds the same number
of mismatched records and reverses the field values.
This has happened in both a 2003 and 2007 database.
Any ideas why this is happening?
workorderentity1
workorder,entityuid,entitytype,feature_id,feature_type...
and
Fbuilding1
objectid,facilityid...
I have setup the following update query.
UPDATE a_WORKORDERENTITY1 AS WE INNER JOIN sde_FBUILDING1 AS FB ON
WE.ENTITYUID = FB.FacilityID SET WE.FEATURE_ID = FB.OBJECTID
WHERE (((WE.ENTITYTYPE)="fbuilding") AND ((FB.OBJECTID)<>[WE].[FEATURE_ID]));
I expected that this query would copy the objectid value from sde_fbuilding1
to the feature_id field of the a_workorderentity1 table. However, what is
happening is the values are being swapped. The feature_id value is being
copied to the objectid field and the objectid value is being copied to the
feature_id field. Thus, each time I run the query it finds the same number
of mismatched records and reverses the field values.
This has happened in both a 2003 and 2007 database.
Any ideas why this is happening?