Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CREATE TABLE as select filtered fileds from table

PS SPFeb 7 2022

I am creating tables with following syntax:
execute immediate ''CREATE TABLE "<TGT_SCHEMA>"."<TGT_TABLENAM>"
AS (SELECT AA.* FROM "<SRC_SCHEMA>"."<SRC_OBJECTNAM>"<DBLINK> AA WHERE 1=2)'';
But i want to filter out few fileds which starts with "ABCD" is there any way i can do ?
I can do it with loop but loop is not the solution to my product, as some times entire string exceeds more than 4000 and when i do schedule, Oracle scheduler not accpets beond certain characters as a length.
Thanks

This post has been answered by BEDE on Feb 7 2022
Jump to Answer
Comments
Post Details
Added on Feb 7 2022
3 comments
189 views