Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I try to extract data using bellow query , it sow this error after execution . please help me to correct this query.

Error:
SQL
#1054 - Unknown column 'payments.date' in 'where clause' 


My query;

SQL
SELECT issue.bill_id as 'Bill id', items.i_code as 'Item code', issue.qtt as 'Qtt', issue.date as 'Date', issue.bill_serial as 'Bill number',issue.qtt*trip.h_price as 'Total' from issue INNER JOIN items ON issue.item_id=items.i_id INNER JOIN trip ON issue.bill_id=trip.bill_id AND issue.item_id=trip.item_id  WHERE issue.c_id=1 AND payments.date BETWEEN '2015-01-20 11:16:43' AND '2016-01-29 11:16:43'
Posted

1 solution

payments table not specified in your from clause.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900