Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Interface with Microsoft Word

Re: Oracle Interface with Microsoft Word

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Tue, 06 May 2003 19:57:55 GMT
Message-ID: <MPG.1921b39b2de0801698976f@news.la.sbcglobal.net>


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 > DBA
Received on Tue May 06 2003 - 14:57:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US