Hi everyone, I’m with issue I have a query and when I executed in my database bring me result (rows)
but when I execute in the application the result is empty, I’ve already set debug=1 and the result is this.
=====///======
SELECT lcv.name, cpr.receipt_document, ctc.cost_description, ctc.cost_description_description
FROM tabLanded Cost Voucher
lcv
LEFT JOIN tabLanded Cost Purchase Receipt
cpr ON cpr.parent = lcv.name
LEFT JOIN tabLanded Cost Taxes and Charges
ctc ON ctc.parent = lcv.name
WHERE lcv.name IN (‘LCV00058’, ‘LCV00057’)
=====///======
The weird thing is the message on extras: Impossible WHERE noticed after reading const tables
That’s the code:
=====///======
datas = frappe.db.sql_list(“”" SELECT lcv.name, cpr.receipt_document, ctc.cost_description, ctc.cost_description_description
FROM tabLanded Cost Voucher
lcv
JOIN tabLanded Cost Purchase Receipt
cpr ON cpr.parent = lcv.name
JOIN tabLanded Cost Taxes and Charges
ctc ON ctc.parent = lcv.name
WHERE lcv.name IN (%s) “”“, str(vouchers).replace(”[“, “”).replace(”]", “”).replace(“u”, “”), debug=1)
=====///======
Thanks for advance.