OTL Time Sheet Query

--OTL Time Sheet Script
SELECT comp.layout_component_id,
tbb.time_building_block_id,
ta.time_attribute_id,
ta.time_attribute_id data_component_id,
ta.attribute1 preference_name,
ta.time_attribute_id attribute_index,
ta.time_attribute_id row_index,
ta.time_attribute_id column_index,
ta.time_Attribute_id blockvo_row,
ta.time_Attribute_id attributevo_row,
ta.attribute1 field_name,
ta.attribute1 translator_row_type,
ta.attribute1 deleted_row,
tbb.resource_id
FROM hxc_layout_components comp,
hxc_time_building_blocks tbb,
hxc_time_Attribute_usages tau,
hxc_time_attributes ta
WHERE ta.time_attribute_id = -987456321
AND ta.time_attribute_id = tau.time_attribute_id
AND tau.time_building_block_id = tbb.time_building_block_id
AND tau.time_building_block_ovn = tbb.object_version_number
AND comp.layout_component_id = tbb.resource_id
AND tbb.resource_id = NVL(:p_resource_id,tbb.resource_id)