Re: Joins don't work with Oracle
[prev]
[thread]
[next]
[Date index for 2005/03/04]
Michele Valzelli wrote:
> Today I tried to play with joins ad described here
> http://www.class-dbi.com/cgi-bin/wiki/index.cgi?UsingJoins .
> Unfortunately this doesn't work with Oracle since it uses the " AS
> $alias" syntax to create sql table aliases, while Oracle doesn't
> accept the 'AS' word.
>
> What is the easiest workaround for this?
>
> Michele
>
Since you didn't describe how you tried
I've done it like:
__PACKAGE__->set_sql(persons => qq {
select artist.artistid
from artist, person
where artist.artistid = person.artistid
and person.gender = ?});
I haven't played with the form:
$class->set_sql(my_query => <<"");
SELECT __ESSENTIAL__
FROM __TABLE(Class::One=c1)__,
__TABLE(Class::Two=c2)__
WHERE __JOIN(c1 c2)__
AND %s
|
|
Re: Joins don't work with Oracle
Jay Strauss 17:39 on 04 Mar 2005
|