Re: links from queries to tables:

Frank Schönheit - Sun Microsystems Germa ny <[email protected]>
Newsgroups gmane.comp.openoffice.dba.user
Message-ID <[email protected]>
Hi Uwe Brauer wrote:

> Is the following possible,[1]
>  (using an Odbc connection to a  mysql base.)
> 
> 1. Table1 contain field1 (primary  key) field2 
> 
> 2. Query1 contains
>    field1, field2 and the sum of them field1+field2 with the
>    alias sum12
> 
> Now I want either 
> 
>     -  to  link the whole query1 to a new table2, or
> 
>     - to link the  new  field sum12 to  a  new field in   table1,
>       however that might be a little delicate infinite loops etc,
>       if you are not careful.

I think what you want to have here is a view - basically a server-side
SELECT statement, which to the clients - including OOo - appears as if
it were a table. Instead of creating Query1, you would simply create a
view with the very same SELECT statement.

Unfortunately, I just tried this with a MySQL 4.1.7 on WinXP via ODBC,
and got an error message whenever I tried to create a view (no matter if
via OOo or otherwise). However, I even tried exactly the examples from
the MySQL documentation, which didn't work, too. In other words: There
is at least one MySQL version were creating a view seems to be broken ...

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer         [email protected] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Database                   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.