フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Priyanka Dhingra
Service Builder
2012/11/13 22:33
答え

Priyanka Dhingra

ランク: Liferay Master

投稿: 501

参加年月日: 2011/12/19

最近の投稿

Hi
 1select
 2  count(track.id_terminal)
 3, company.name as myResult
 4from  track,detailsForTerminal, client,service,terminal, customer,customerGroup,Location,Item,company_plan,company
 5Where track.id_client = client.client_id
 6and
 7detailsForTerminal.id_terminal = track.id_terminal
 8and
 9detailsForTerminal.id_group = customerGroup.customerGroup_id
10and
11service.id_client = client.client_id
12and
13service.id_rm = terminal.terminal_id
14and
15track.id_customer = customer.customer_id
16and
17customerGroup.id_customer = customer.customer_id
18and terminal.serial = Location.rm_serial
19and
20Location.id_Item = Item.Item_id
21and
22Item. id_plan =  company_plan.companyplan_id
23and company_plan.id_company = company.company_id
24and customer.customer_id = 100
25group by company.name

How can i go about this kind of query using service builder??

thanks and regards
Priyanka Dhingra
Juan Gonzalez
RE: Service Builder
2012/11/13 23:47
答え

Juan Gonzalez

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1967

参加年月日: 2008/10/28

最近の投稿

Did you try using custom sql? See link below:

http://www.liferay.com/community/wiki/-/wiki/Main/Custom+queries+in+Liferay
Subhash Pavuskar
RE: Service Builder
2012/11/14 1:13
答え

Subhash Pavuskar

ランク: Regular Member

投稿: 234

参加年月日: 2012/03/12

最近の投稿

Hope this 2 links may help you to solve your Custom Query !!

Link1

Link2
Priyanka Dhingra
RE: Service Builder
2012/11/14 21:50
答え

Priyanka Dhingra

ランク: Liferay Master

投稿: 501

参加年月日: 2011/12/19

最近の投稿

thanks for the link...

but I have multiple tables in from clause ...so what should be the finder class and interface to refer???

Better if i could find a solution using some hibernate logic, since I have many queries like that...may be some workaround like inner join or something can help...but I do not have much knowledge on db
Priyanka Dhingra
RE: Service Builder
2012/11/16 7:06
答え

Priyanka Dhingra

ランク: Liferay Master

投稿: 501

参加年月日: 2011/12/19

最近の投稿

Help!! emoticon