151: select column_name, column_id
152: from all_tab_columns tc
153: where (tc.owner,tc.table_name) in (
154: select us.table_owner,us.synonym_name
155: from user_synonyms us
156: where us.synonym_name = p_table_name)
157: and tc.column_name <> 'MAJOR_VERSION'
158: and tc.data_type not in ('LONG', 'LONG RAW')
159: and exists (
157: and tc.column_name <> 'MAJOR_VERSION'
158: and tc.data_type not in ('LONG', 'LONG RAW')
159: and exists (
160: select 1
161: from user_synonyms us2,
162: all_tab_columns tc2
163: where us2.synonym_name = p_hist_table_name
164: and tc2.table_name = us2.synonym_name
165: and tc2.owner = us2.table_owner
169:
170: /*
171: select distinct column_name, column_id
172: from all_tab_columns tc
173: , user_synonyms us
174: where us.synonym_name = p_table_name
175: and tc.table_name = us.synonym_name
176: and tc.owner = us.table_owner
177: and tc.column_name <> 'MAJOR_VERSION'
178: and tc.data_type not in ('LONG', 'LONG RAW')
179: and exists (
180: select null
181: from all_tab_columns tc2
182: , user_synonyms us2
183: where us2.synonym_name = p_hist_table_name
184: and tc2.table_name = us2.synonym_name
185: and tc2.owner = us2.table_owner
186: and tc2.column_name = tc.column_name
283: select column_name, column_id
284: from all_tab_columns tc
285: where (tc.owner,tc.table_name) in (
286: select us.table_owner,us.synonym_name
287: from user_synonyms us
288: where us.synonym_name = p_table_name)
289: and tc.column_name <> 'MAJOR_VERSION'
290: and tc.data_type not in ('LONG', 'LONG RAW')
291: and exists (
289: and tc.column_name <> 'MAJOR_VERSION'
290: and tc.data_type not in ('LONG', 'LONG RAW')
291: and exists (
292: select 1
293: from user_synonyms us2,
294: all_tab_columns tc2
295: where us2.synonym_name = p_hist_table_name
296: and tc2.table_name = us2.synonym_name
297: and tc2.owner = us2.table_owner
301:
302: /*
303: select distinct column_name, column_id
304: from all_tab_columns tc
305: , user_synonyms us
306: where us.synonym_name = p_table_name
307: and tc.table_name = us.synonym_name
308: and tc.owner = us.table_owner
309: and tc.column_name <> 'MAJOR_VERSION'
310: and tc.data_type not in ('LONG', 'LONG RAW')
311: and exists (
312: select null
313: from all_tab_columns tc2
314: , user_synonyms us2
315: where us2.synonym_name = p_hist_table_name
316: and tc2.table_name = us2.synonym_name
317: and tc2.owner = us2.table_owner
318: and tc2.column_name = tc.column_name