D
David
Hi,
I have part of my SQL statement in my asp page as follows:
WHERE ((pcbforecast.ShipETA < '31/12/2005') and
(products.BBProductName = .......
The problem I am having is that I want the selected records only with
a ShipETA less than 31/12/2005.
My asp pages are running via MySQL on our Windows Server. I have tried
using # and various other ways, but the records listed either ignore
the date or throw an error or show no records. There are records.
__________________________________________
The full SQL Statement is:
strQuery = "SELECT customers.CustomerName,orders.PONumber,orders.OrderDate,orderlines.OrderQuantity,
orderlines.Selectall, orderlines.OrderfromSD, orderlines.JobNumber,
orderlines.EntryDate , Sum(pcbforecast.ShipQty) as Total,
pcbforecast.ShipQty, pcbforecast.ShipETA,products.BBProductName,
products.ProductName FROM customers"
strQuery = strQuery & " INNER JOIN orders ON (customers.CustomerID =
orders.CustomerID) INNER JOIN orderlines ON (orders.OrderID =
orderlines.OrderID) INNER JOIN products ON (orderlines.ProductID =
products.ProductID) INNER JOIN pcbforecast ON (orderlines.JobNumber =
pcbforecast.JobNumber)"
strQuery = strQuery & " WHERE ((pcbforecast.ShipETA < '31/12/2005')
and (products.BBProductName = '" & ProductRequest & "') and
(customers.CustomerName = 'SD UK'))"
strQuery = strQuery & " GROUP BY
customers.CustomerName,orders.PONumber,orders.OrderDate,orderlines.OrderQuantity,
orderlines.Selectall, orderlines.OrderfromSD, orderlines.JobNumber,
orderlines.EntryDate ,pcbforecast.ShipQty,
pcbforecast.ShipETA,products.BBProductName, products.ProductName;"
__________________________________________________________
Where am I going wrong ?
Appreciate your help
Thanks
David
I have part of my SQL statement in my asp page as follows:
WHERE ((pcbforecast.ShipETA < '31/12/2005') and
(products.BBProductName = .......
The problem I am having is that I want the selected records only with
a ShipETA less than 31/12/2005.
My asp pages are running via MySQL on our Windows Server. I have tried
using # and various other ways, but the records listed either ignore
the date or throw an error or show no records. There are records.
__________________________________________
The full SQL Statement is:
strQuery = "SELECT customers.CustomerName,orders.PONumber,orders.OrderDate,orderlines.OrderQuantity,
orderlines.Selectall, orderlines.OrderfromSD, orderlines.JobNumber,
orderlines.EntryDate , Sum(pcbforecast.ShipQty) as Total,
pcbforecast.ShipQty, pcbforecast.ShipETA,products.BBProductName,
products.ProductName FROM customers"
strQuery = strQuery & " INNER JOIN orders ON (customers.CustomerID =
orders.CustomerID) INNER JOIN orderlines ON (orders.OrderID =
orderlines.OrderID) INNER JOIN products ON (orderlines.ProductID =
products.ProductID) INNER JOIN pcbforecast ON (orderlines.JobNumber =
pcbforecast.JobNumber)"
strQuery = strQuery & " WHERE ((pcbforecast.ShipETA < '31/12/2005')
and (products.BBProductName = '" & ProductRequest & "') and
(customers.CustomerName = 'SD UK'))"
strQuery = strQuery & " GROUP BY
customers.CustomerName,orders.PONumber,orders.OrderDate,orderlines.OrderQuantity,
orderlines.Selectall, orderlines.OrderfromSD, orderlines.JobNumber,
orderlines.EntryDate ,pcbforecast.ShipQty,
pcbforecast.ShipETA,products.BBProductName, products.ProductName;"
__________________________________________________________
Where am I going wrong ?
Appreciate your help
Thanks
David