Subject Re: union with insert select
Author svein_erling
Ben,

just change and simplify your query a little bit:

INSERT INTO T_LEDGER ( entry_date, account_nm, narration, debit,
credit, journal_no )
SELECT account_book.entry_date, account_heads.account_nm,
account_book.narration, account_book.debit, account_book.credit,
account_book.journal_no
FROM account_book, account_heads
WHERE (account_book.l_account_id = account_heads.id
AND account_book.account_id = :dAcID)
OR (account_book.account_id = account_heads.id
AND account_book.l_account_id = :dAcID)
AND ( account_book.entry_date BETWEEM :dFrom AND :dTo )

HTH,
Set