if u see the above image then the problem can be clearly seen that the left hand side rows are repeated for every row on right side.
Please help me to solve this problem. This result come by pulling data using Sql Query made by Crystal Report.
So Please help me to solve this problem. Its very urgent. Please tell me if i have to write query using the SQL, This help will be highly appriciated.
I have tried to run the query using phpmyadmin SQL editor, the query i wrote is :---
SELECT
`payments`.`paymentDate`,
`payments`.`Paymode`,
`payments`.`amt`,
`payments`.`voucherType`,
`payments`.`Chqddno`
`purchaseinvoicemast`.`bookInvoiceNo`,
`purchaseinvoicemast`.`todaysdt`,
`purchaseinvoicemast`.`finalAmount`,
`purchaseinvoicemast`.`sellersName`,
`purchaseinvoicemast`.`customerCode`
FROM `payments`, `purchaseinvoicemast`
WHERE ((`purchaseinvoicemast`.`customerCode`='SUP3') AND ( `payments`.`vendorId`='SUP3' ))
Please help this is very urgent for my software....

Kedar PawgiPosted Sep 16, 2013, 7:31 AM
Here is my query with group by
SELECT
`payments`.`paymentDate`,
`payments`.`Paymode`,
`payments`.`amt`,
`payments`.`voucherType`,
`payments`.`Chqddno`,
`purchaseinvoicemast`.`bookInvoiceNo`,
`purchaseinvoicemast`.`todaysdt`,
`purchaseinvoicemast`.`finalAmount`,
`purchaseinvoicemast`.`sellersName`,
`purchaseinvoicemast`.`customerCode`
FROM `payments`, `purchaseinvoicemast`
WHERE ((`purchaseinvoicemast`.`customerCode`='SUP3') AND ( `payments`.`vendorId`='SUP3' ))
GROUP BY `purchaseinvoicemast`.`customerCode`
if i use this query it shows only one row in answer, if i use following query it gives different query as i have joined the IDs., the 2nd query is ....
SELECT
`payments`.`paymentDate`,
`payments`.`Paymode`,
`payments`.`amt`,
`payments`.`voucherType`,
`payments`.`Chqddno`,
`purchaseinvoicemast`.`bookInvoiceNo`,
`purchaseinvoicemast`.`todaysdt`,
`purchaseinvoicemast`.`finalAmount`,
`purchaseinvoicemast`.`sellersName`,
`purchaseinvoicemast`.`customerCode`
FROM `payments`, `purchaseinvoicemast`
WHERE ((`purchaseinvoicemast`.`customerCode`=`payments`.`vendorId` ))
GROUP BY `purchaseinvoicemast`.`customerCode`
So please guide me on this..
Thanks again in advance.
venkata kumarPosted Sep 16, 2013, 6:27 AM