Hi I have the following SQl statement which Im executing in pervasive v9.
The stateemnt works except fot the last conditionion namely the:
AND HistoryHeader.C losingDate <= '8/30/2007'
Complete Statement is:
SELECT CustomerMaster. UserDefined05 AS 'TRIP'
, CustomerMaster. UserDefined04 AS 'TOWN'
, CustomerMaster. CustomerDesc AS 'CUSTOMER'
, HistoryHeader.D ocumentDate AS 'ORDER DATE'
, HistoryHeader.C losingDate AS 'PLAN DATE'
, HistoryHeader.M essage01 AS 'TIME'
, HistoryHeader.M essage02 AS 'USER'
, HistoryHeader.S alesManCode AS 'ORIGIN'
, HistoryHeader.M essage03 AS 'KEEP'
, InventoryCatego ry.ICDesc AS 'PRODCATDESC'
, Inventory.Descr iption AS 'PRODUCT NAME'
, Inventory.ItemC ode AS 'PRODUCT CODE'
, Inventory.UserD efText01 AS 'PRODUCT SIZE'
, Inventory.UserD efText02 AS 'PRODUCT FLAVOUR'
, HistoryLines.Qt y AS 'PRODUCT QTY'
, HistoryLines.Un itPrice AS 'UNIT PRICE'
, HistoryLines.Do cumentNumber AS 'INVOICED'
FROM CustomerMaster
INNER JOIN HistoryHeader
ON CustomerMaster. CustomerCode = HistoryHeader.C ustomerCode
INNER JOIN HistoryLines
ON HistoryHeader.C ustomerCode = HistoryLines.Cu stomerCode
INNER JOIN Inventory
ON HistoryLines.It emCode = Inventory.ItemC ode
INNER JOIN InventoryCatego ry
ON Inventory.Categ ory = InventoryCatego ry.ICCode
WHERE CustomerMaster. UserDefined05
IN ('PE')
AND HistoryHeader.C losingDate <= '8/30/2007'
The Error is:
[LNA][Pervasive][ODBC Engine Interface]Error in predicate: HistoryHeader . ClosingDate <= '8/30/2007'
Any ideas please?
The stateemnt works except fot the last conditionion namely the:
AND HistoryHeader.C losingDate <= '8/30/2007'
Complete Statement is:
SELECT CustomerMaster. UserDefined05 AS 'TRIP'
, CustomerMaster. UserDefined04 AS 'TOWN'
, CustomerMaster. CustomerDesc AS 'CUSTOMER'
, HistoryHeader.D ocumentDate AS 'ORDER DATE'
, HistoryHeader.C losingDate AS 'PLAN DATE'
, HistoryHeader.M essage01 AS 'TIME'
, HistoryHeader.M essage02 AS 'USER'
, HistoryHeader.S alesManCode AS 'ORIGIN'
, HistoryHeader.M essage03 AS 'KEEP'
, InventoryCatego ry.ICDesc AS 'PRODCATDESC'
, Inventory.Descr iption AS 'PRODUCT NAME'
, Inventory.ItemC ode AS 'PRODUCT CODE'
, Inventory.UserD efText01 AS 'PRODUCT SIZE'
, Inventory.UserD efText02 AS 'PRODUCT FLAVOUR'
, HistoryLines.Qt y AS 'PRODUCT QTY'
, HistoryLines.Un itPrice AS 'UNIT PRICE'
, HistoryLines.Do cumentNumber AS 'INVOICED'
FROM CustomerMaster
INNER JOIN HistoryHeader
ON CustomerMaster. CustomerCode = HistoryHeader.C ustomerCode
INNER JOIN HistoryLines
ON HistoryHeader.C ustomerCode = HistoryLines.Cu stomerCode
INNER JOIN Inventory
ON HistoryLines.It emCode = Inventory.ItemC ode
INNER JOIN InventoryCatego ry
ON Inventory.Categ ory = InventoryCatego ry.ICCode
WHERE CustomerMaster. UserDefined05
IN ('PE')
AND HistoryHeader.C losingDate <= '8/30/2007'
The Error is:
[LNA][Pervasive][ODBC Engine Interface]Error in predicate: HistoryHeader . ClosingDate <= '8/30/2007'
Any ideas please?