Gerhardpet
asked on
Need help with query for Pervasive
I have a query that I want to use for extracting data form a Pervasive database and then insert to a table.
This is the first part of the query which works in PostgreSQL
In Pervasive the invoice_date is a string like so 20141128
Can someone help me with this? Once I got this working I will post the whole query is I need more help.
This is the first part of the query which works in PostgreSQL
SELECT d.whse, d.part_no, EXTRACT(YEAR FROM d.invoice_date), EXTRACT(MONTH FROM d.invoice_date)
FROM sales_history_items AS d
In Pervasive the invoice_date is a string like so 20141128
Can someone help me with this? Once I got this working I will post the whole query is I need more help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If it is the EXTRACT, the Pervasive syntax for EXTRACT (in v10 and v11, at least) is:
Open in new window
So your query would be :Open in new window