Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: dhrobertsonHi,
I want to be able to do delta loads of information from an oracle database. There is a field called invoice_date which is a datetime field and I want to use this to filter on for each run.
With the ERP node you can pass through fields and use this as part of a filter to filter the SAP data. I need to be able to do the same with an Oracle DB.
I have used DB Query nodes to initially get the data out of the Oracle DB which is fine. after each run I will write a DateTime stamp to a brd and use this as the field for filtering each subsequent run.
I cant see a way of adding input pins to a DB Query node so am I right in thinking I would actually need to use the DB Execute node to pass through a timestamp field via a input pin to the node and then somehow query this field in the SQL code in the node?
I'm not sure how the SQL code would look in the node for DB Execute node.
eg. to get back all data where country_code == FR or GB from a table called DS_DIRECT_SALES in the DB Query node I write:
Select * from "DS_DIRECT_SALES" where COUNTRY_CODE = 'GB' or COUNTRY_CODE = 'FR'
how would I write this in a DB Execute node using a timestamp field as an additional filter?
something like this where runtime is a field which is input to the DB Execute node:
SqlNonSelect("select * from DS_DIRECT_SALES where COUNTRY_CODE = 'GB' or COUNTRY_CODE ='FR' and INVOICE_DATE >= runtime ")
using the SqlNonSelect statement, how do I reference the Database correctly and also how to I reference the runtime input field? ie. where do the ' ' or "" go in the statement for it to work correctly?
any ideas greatly appreciate. I'm sure this is a simple problem. if someone could help I'd appreciate it.
thanks
Douglas