0

Anyone know what is the ORM function for joining multiple db tables in ERPNext? I need query result from 2 DB tables join using script report

*I don't need query report answer since i already have it. I only looking for an example do it using script report

shar_evonz
  • 33
  • 7

2 Answers2

1

Frappe currently doesn't have ORM support for joining tables. You might have to use frappe.db.sql for the time being.

gavin
  • 793
  • 1
  • 7
  • 19
0

data = frappe.db.sql( """ select tb1.name from tabTable1 as tb1 left join tabTable2 as tb2 on tb1.name = tb2.employee_name; """ ); return data