I have three tables.
1) Accounts - target table in m_accounts
nsf_date
2) Account_transactions - target table in m_account_transactions
transaction_code
3) source_target_xref
Following is Psuedo code which i have written based on functional specs.
IFF
account_transaction.transaction_code in
(select account_id, transaction_code from account_transactions where transaction_code in
(select FLD1_SOURCE_VALUE from source_target_xref where ref_source_system_id = 10 and reference_table_name = 'NSF_TRANSACTIONS'))
Then
Update accounts set nsf_date = max(nsf_date,created_date) where account_id = same account_id's that satisfy above select statement
I want to update( based on the above logic ) the 'nsf_date' field in accounts table while i am running wf_account_transactions which loads account_transactions table.
Do i have to do this through m_account_trasactions mapping or m_accounts mapping.?
I am told not to touch the m_accounts mapping.Is it possible?
My m_account_transactions is a direct 1:1 mapping
Source table : account_transactions_stg(oracle)
target table : account_transactions(oracle)
How do i implement this.
1)do i need to create a stored procedure and call it through stored procedure transformation?
2)If so how do i incorporte that iff condition in that.
3)I am thinking of using a lookup trx for source_target_xref.Do i use a connected or unconnected?
or
You may please suggest a simpler method if there is one
Help appreciated.
1) Accounts - target table in m_accounts
nsf_date
2) Account_transactions - target table in m_account_transactions
transaction_code
3) source_target_xref
Following is Psuedo code which i have written based on functional specs.
IFF
account_transaction.transaction_code in
(select account_id, transaction_code from account_transactions where transaction_code in
(select FLD1_SOURCE_VALUE from source_target_xref where ref_source_system_id = 10 and reference_table_name = 'NSF_TRANSACTIONS'))
Then
Update accounts set nsf_date = max(nsf_date,created_date) where account_id = same account_id's that satisfy above select statement
I want to update( based on the above logic ) the 'nsf_date' field in accounts table while i am running wf_account_transactions which loads account_transactions table.
Do i have to do this through m_account_trasactions mapping or m_accounts mapping.?
I am told not to touch the m_accounts mapping.Is it possible?
My m_account_transactions is a direct 1:1 mapping
Source table : account_transactions_stg(oracle)
target table : account_transactions(oracle)
How do i implement this.
1)do i need to create a stored procedure and call it through stored procedure transformation?
2)If so how do i incorporte that iff condition in that.
3)I am thinking of using a lookup trx for source_target_xref.Do i use a connected or unconnected?
or
You may please suggest a simpler method if there is one
Help appreciated.