Subject Extracting Table names from a SQL select statement
Author sshowl09
Hi,

Is there a way to use IBObjects to extract the table names from a SQL statment.

For example, if a user provided the following string :
(Completely made up example, the user could provide any SQL statement)

"
Select * from ADDRESS A, PERSON P WHERE
A.PERSON_ID = P.PERSON_ID and P.CATEGORY NOT IN
(
SELECT CATEGORY_ID FROM PERSON_CATEGROY WHERE UNLAWFUL='Y'
)
"

I could use IBObjects to extract

'ADDRESS', 'PERSON', 'PERSON_CATEGORY'

as the list of referenced table names ?


Cheers
Sam