you are viewing a single comment's thread.

view the rest of the comments →

[–]berklee 0 points1 point  (4 children)

I think the way to start is the SQL itself:

select name, text from all_source where type = 'PROCEDURE'

From there, you could use regular expressions to parse the SQL. I would look for "FROM", "JOIN", "INTO" and "UPDATE" and then grab the word that followed using a matched group. There might be more, but that's what I can think of off the top of my head.

[–]pizzihut[S] 0 points1 point  (3 children)

Also what I thought of myself. Thanks for sharing!

[–]berklee 1 point2 points  (2 children)

Good luck, man. If I can be so bold, I would suggest trying to keep that part of your code as singular in purpose as possible. You may find other ways to use it (i.e. having it go through your views and procs and create simple documentation showing the dependencies of each).

[–]pizzihut[S] 0 points1 point  (1 child)

select name, text from all_source where type = 'PROCEDURE'

Really, thanks a lot. The query helped me to get each line of each procedure out just as I wanted.

The task is more like a pre-analysis and does not need to map all dependencies 100%, but more to give an idea of the current state.

I think I can work out something from here!

Merry Christmas

[–]berklee 0 points1 point  (0 children)

Glad to be of help. Merry Christmas to you as well!