Thanks for the response and it worked for me.
On Sun, Dec 6, 2015 at 7:12 PM, Tomasz Guziałek <[email protected]>
wrote:
> True. I have always used the version with WHERE clause, so completely
> missed innerJoin, leftJoin and rightJoin:
>
> dataContext.query().from("tableA").innerJoin("tableB").on("columnFromA",
> "columnFromB").selectAll().execute();
>
> Pozdrawiam / Regards / Med venlig hilsen
> Tomasz Guziałek
>
> 2015-12-06 12:39 GMT+01:00 Kasper Sørensen <[email protected]
> >:
>
> > Well, a first-class join is also possible. Just use the query API... I'm
> > not even sure what the question is here Arunkumar??
> >
> > 2015-12-05 23:41 GMT+01:00 Tomasz Guziałek <[email protected]>:
> >
> > > Hello Arunkumar,
> > >
> > > MetaModel does not have specialialized constructs for JOIN operations.
> > Try
> > > writing your query in such a manner:
> > >
> > >
> > >
> >
> dataContext.query().from("tableA").and("tableB").selectAll().where("joinColumnFromA").eq("joinColumnFromB").executeQuery();
> > >
> > > Pozdrawiam / Regards / Med venlig hilsen
> > > Tomasz Guziałek
> > >
> > > 2015-12-04 11:19 GMT+01:00 Arunkumar Pillai <[email protected]>:
> > >
> > > > Please help in executing the following queries
> > > >
> > > > SELECT a.id as ID,
> > > > a.a_name as a_NAME ,b.user_name
> > > > FROM TB_a a inner join TB_b b on b.id = a.id
> > > > WHERE a.active = 1
> > > >
> > > >
> > > > I'm not finding any examples for joins
> > > > or directly converting the sql queries to meta model query
> > > >
> > > > --
> > > > Thanks and Regards
> > > > Arun
> > > >
> > >
> >
>
--
Thanks and Regards
Arun