left join and condition

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

left join and condition

stamilo
hi,
  i want to define a view like this:

 select * from tablea a left join ( select * from tableb where f_deleted =
0) b
on a.id = b.id

but i only can define like this:
 select * from tablea a left join table b
on a.id = b.id

when i add a where condition  where f_deleted=0  , .. the result is
different  :(


 i can't find any info about that in entity engine guide,
 there is no where condition tag,

 how i can ?

 thx!
Reply | Threaded
Open this post in threaded view
|

Re: left join and condition

Jacques Le Roux
Administrator
You can't : http://ofbiz.apache.org/docs/entity.html#View_Entity_Modeling
Have a look at http://www.nabble.com/forum/Search.jtp?local=y&forum=2740&query=where+in+entity+view
This is for instance what you may have found with such a search
http://www.nabble.com/-OFBiz--Dev---How-to-filter-a-field-in-a-%3Cview-entity%3E-td570945.html#a570945

Jacques

From: "stamilo" <[hidden email]>

> hi,
>  i want to define a view like this:
>
> select * from tablea a left join ( select * from tableb where f_deleted =
> 0) b
> on a.id = b.id
>
> but i only can define like this:
> select * from tablea a left join table b
> on a.id = b.id
>
> when i add a where condition  where f_deleted=0  , .. the result is
> different  :(
>
>
> i can't find any info about that in entity engine guide,
> there is no where condition tag,
>
> how i can ?
>
> thx!
>

Reply | Threaded
Open this post in threaded view
|

Re: left join and condition

stamilo
thanks!


On Sat, Jul 26, 2008 at 3:09 PM, Jacques Le Roux <
[hidden email]> wrote:

> You can't : http://ofbiz.apache.org/docs/entity.html#View_Entity_Modeling
> Have a look at
> http://www.nabble.com/forum/Search.jtp?local=y&forum=2740&query=where+in+entity+view
> This is for instance what you may have found with such a search
> http://www.nabble.com/-OFBiz--Dev---How-to-filter-a-field-in-a-%3Cview-entity%3E-td570945.html#a570945
>
> Jacques
>
> From: "stamilo" <[hidden email]>
>
>  hi,
>>  i want to define a view like this:
>>
>> select * from tablea a left join ( select * from tableb where f_deleted =
>> 0) b
>> on a.id = b.id
>>
>> but i only can define like this:
>> select * from tablea a left join table b
>> on a.id = b.id
>>
>> when i add a where condition  where f_deleted=0  , .. the result is
>> different  :(
>>
>>
>> i can't find any info about that in entity engine guide,
>> there is no where condition tag,
>>
>> how i can ?
>>
>> thx!
>>
>>
>