Re: [gnome-db] GdaSqlBuiler: JOIN AS

Murray Cumming <[email protected]>
Newsgroups gmane.comp.gnome.db
Message-ID <1274356103.4050.121.camel@murrayc-desktop>
On Mon, 2010-05-17 at 15:08 +0200, Vivien Malerba wrote:
> >> This example illustrates why you need to be able to set targets'
> >> aliases. In this example you have the following targets:
> >> A: "albums"
> >> B: "artists" with the "relationship_artist_singer" alias
> >> C: "artists" with the "relationship_artist_drummer" alias
> >>
> >> and you reference the targets using their alias in the join condition
> >> and in the list of fields to be selected.
> >>
> >> and 2 joins (joinning conditions not mentionned here):
> >> A <--> B
> >> A <--> C
> >>
> >> the joins themselves are never referenced anywhere in the statement,
> >> so they are not named.
> >
> > So the SQL statement would/could look different?
> 
> When using the GdaSqlBuilder, the rendered sql statement looks like
> the one in your example (it is normal SQL, no GDA extension).

Yes, when I specify the alias in my call to
gda_sql_builder_select_add_target() and then use the returned ID as the
target (instead of the table) when calling
gda_sql_builder_select_join_targets() then it works fine.

Thanks.


-- 
[email protected]
www.murrayc.com
www.openismus.com
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.