MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
And I need use this table list, in other sentence:
a_5min_001 a_5min_002 a_5min_003
output, for tablename=a_5min_001
select distinct pointnumber from <hisrfrequency.tablename>;
Then for each pointnumbers, execute a delete, for example
10001 10002 10003 ...
They could send me some example to follow?
DECLARE cursor c1 is select * from hisrfrequency; r1 c1%ROWTYPE; cursor c2 (r1 c1%ROWTYPE) is select distinct pointnumber from r1.tablename; r2 c2%ROWTYPE; str_del VARCHAR2(300); begin open open c1; loop fetch c1 into r1; exit when c1%notfound; dbms_output.put_line(chr(10)||r1.tablename); begin open c2(r1.tablename); loop fetch c2 into r2; exit when c2%notfound; dbms_output.put_line(chr(10)||r2.pointnumber); str_del := 'delete <r1.tablename> where pointnumber = <r2.pointnumber>'; execute immediate str_del; end loop; close c2; end; end loop; close c1; end; /
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Read XML values||8||58|
|Trigger to update a specific column in Table B after insert or update record from Table A||13||54|
|running myfile.SQL from command line SQLPLUS 12c does not exit.||7||37|
|Oracle SQL Developer - SubString||2||31|