Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Interface with Microsoft Word
rita.wilemon_at_marioncountyfl.org said...
> Does anyone have any ideas on how to create a MSQuery using oracle
> tables? Problem seems to occur when you have a one to many
> relationship between oracle tables. When you access the fields in
> word the data from the tables that could have many records related to
> the one are blank. If you do one to one relationship queries
> everything works ok.
>
> Also MS Word seems to only work when you use a userid that is the
> owner of the tables. When we use a userid that has read access to the
> tables we get an error or the screen freezes up. Does anyone know if
> it is a requirement for the userid to be the owner of the tables when
> accessing the queries? (This seems kind of odd.)
>
Depends on how you want the results presented. If you want it like this:
Parent_A
Child_A1
Child_A2
...
Child_An
Parent_B
...
then you need to write a VBA routine because MSQuery won't know how many "child" rows to reserve for each "parent" when it builds the Word table.
If you want it like this:
Parent_A Child_A1
Parent_A Child_A2
...
Parent_B Child_B1
...
then you use a join in your MSQuery:
select p.some_field, c.some_field
from parent_table p, child_table c
where p.key = c.key
group by p.some_field
or something similar.
-- /Karsten DBA > retired > DBAReceived on Tue May 06 2003 - 14:57:55 CDT
![]() |
![]() |