[Home] [Help]
166: BEGIN
167:
168: -- populate jtf_type_qtype_usgs_all table with
169: -- qual_type_usg_id and terr_type_id
170: -- intersection table for jtf_qual_type_usgs_all and
171: -- jtf_terr_types_all tables
172:
173: insert into jtf_type_qtype_usgs_all
174: ( TYPE_QTYPE_USG_ID
189: , jttu.terr_type_id
190: , jqtu.qual_type_usg_id
191: , jttu.org_id
192: from jtf_terr_type_usgs_all jttu
193: , jtf_qual_type_usgs_all jqtu
194: where jqtu.source_id = jttu.source_id
195: and jttu.source_id = -1002
196: and jttu.terr_type_id = -9
197: and jqtu.qual_type_usg_id <> -1005 -- Exclude service account transaction type
235: , jqu.QUAL_USG_ID
236: , jttu.terr_type_id
237: , jttu.org_id
238: from jtf_terr_type_usgs_all jttu
239: , jtf_qual_type_usgs_all jqtu
240: , jtf_qual_usgs_all jqu
241: where jttu.created_by = 9
242: and jttu.terr_type_id = -9
243: and jttu.source_id = -1002