--CVH Set the parentId of all surface fields of type Tab to 0. Only until upgraded to versino 1.4.2
IF ((SELECT TOP 1 versionNo FROM pal_Setup) < '1.4.2') 
BEGIN
	UPDATE f SET f.parentId = 0 
	FROM pal_SurfaceField f
	WHERE f.surfaceFieldTypeId = 1 
END