Can someone please help me in this minute error.
I wrote this, (which is not working),
SELECT sum(case when SD.order_id>0 then 1 else 0 end) as SD.customer_id
FROM tbl_order_lead_send_detail SD
but, this query is working fine.
SELECT sum(case when order_id>0 then 1 else 0 end) as customer_id
FROM tbl_order_lead_send_detail
You problem is this:
You might consider writing:
EDIT
Becuase you cannot have
.in the column names. If you have them as a string it works. The.is used for columns in tables.