Hi,
I have a MySQL database and in the front-end software I am using to
Run MySQL, I have created a query on the tables which runs in the
front-end, similar to the MS Access query grid.
I now wish to pull this query on-line using .asp, but I seem to have
found out that I can only pull data from tables in MySQL ?
The query I have is :
__________________________________________________ ___________________
strQuery = "SELECT Customers.CustomerName,Orders.PONumber,OrderLines. JobNumber,OrderLines.OrderQuantity,Products.Produc tName,
SUM( StockMovements.QtyShipped ) AS SUM_OF_QtyShipped,
OrderLines.ShipfromPSL,StockMovements.QtyShipped "
strQuery = strQuery & "FROM StockMovements INNER JOIN OrderLines ON
(StockMovements.JobNumber = OrderLines.JobNumber) INNER JOIN Products
ON (OrderLines.ProductID = Products.ProductID) INNER JOIN Orders ON
(OrderLines.OrderID = Orders.OrderID) INNER JOIN Customers ON
(Orders.CustomerID = Customers.CustomerID) "
strQuery = strQuery & "WHERE (Customers.CustomerName <> 'Black Box
UK') and (Customers.CustomerName <> 'Black Box USA') and
(OrderLines.ShipfromPSL = -1) "
strQuery = strQuery & "GROUP BY Customers.CustomerName,
Orders.PONumber, OrderLines.JobNumber, OrderLines.OrderQuantity,
Products.ProductName, OrderLines.ShipfromPSL,
StockMovements.QtyShipped "
strQuery = strQuery & "HAVING ( (OrderLines.OrderQuantity -
SUM(StockMovements.QtyShipped)) >0 ) ORDER BY Customers.CustomerName,
Products.ProductName;"
__________________________________________________ ______________________
Where am I going wrong ?
Appreciate your soonest help
Thanks
David Gordon