Hi All,
I have two lists called
DocList
CommentsList
and in DocList i have a primaryKey column called Id
and which is a lookup column in CommentsList
now i want to join these two tables on this ID column to
retrive the unique documents count from CommentsLIst
can any one write camel query for this and let me know.
sql query look like follows
select distinct(count) from CommentsList CL innerJoin DocList DS on CL.ID = DS.ID
Or just provoide me solution how to retrive didtinct records from CommentsList
Loading
Chetan koralliPosted Oct 5, 2012, 1:16 AM
I wanted a Camel query for this not the sql query.
Venkatesh KumarPosted Oct 4, 2012, 4:24 PM
Venkatesh KumarPosted Oct 4, 2012, 4:24 PM
Hemant SrivastavaPosted Oct 4, 2012, 11:33 AM
If you just interested to get count, then query would be like:
SELECT COUNT(*) FROM CommentsList AS CL
INNER JOIN DocList AS DS ON DS on CL.ID = DS.ID
If you want to grab the records from their inner join:
SELECT DISTINCT * FROM CommentsList AS CL
INNER JOIN DocList AS DS ON DS on CL.ID = DS.ID