Subject | Re: [IBO] Extracting Table names from a SQL select statement |
---|---|
Author | Jason Wharton |
Post date | 2009-03-07T20:44:29Z |
Sam,
Look at the RelationNames[] property of the Fields[] property of your query.
(My spelling could be off.)
HTH,
Jason Wharton
> Is there a way to use IBObjects to extract the table names from a SQLYes. It's in the TIB_Row object.
> 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 ?
Look at the RelationNames[] property of the Fields[] property of your query.
(My spelling could be off.)
HTH,
Jason Wharton