How to pass two parameters in Custom SQL query.?

thumbnail
Mahammad Ashik A, modified 7 Years ago. Junior Member Posts: 81 Join Date: 7/17/17 Recent Posts

Hai,

Here i have two tables

1.candidatedetails

2.jobcandidatemapping

if i want to execute this below sql query, how to write query in .xml page?

SELECT * FROM candidatedetails a, jobcandidatemapping b where a.candidateName like '%a4%' and a.candidateId=b.candidateId and b.jobId=127408;

Thank you.

Vishal Munjani, modified 7 Years ago. Junior Member Posts: 33 Join Date: 2/21/17 Recent Posts

Hello

Refer below url.Needs to add your query in default.xml and Use QueryPos for parameter.

https://dev.liferay.com/es/develop/tutorials/-/knowledge_base/7-0/custom-sql.

 

Thanks

Vishal Munjani

thumbnail
Mahammad Ashik A, modified 7 Years ago. Junior Member Posts: 81 Join Date: 7/17/17 Recent Posts

Thanks for your reply Vishal.