sql - Creating tables with fields from 3 different tables -
I am trying to create a new table for the data group from the following three tables. Fields in account_no
fields BMF
and acct_map
are actually taken from CMF
fields. :
BMF: account_no, trans_date CMF: account_no, balance_due acct_map: account_no, external_id
fields I want in my new table:
external_id, account_no, balance_due
When I use Query 1, without external_id
column, it works fine and correctly Fills the data. But when I try Query 2, it creates an empty table. Why is it happening
query1:
select the table bmf.account_no, sum (cmf.balance_due) postpaid_balance from BMF, making payments in the form of CMF where TO_CHAR ( BMF trans_date, 'YYYY MM DD') = '1996 08 14' and bmf.account_no = cmf.account_no group bmf.account_no
from query 2:
select table bmf.account_no, sum (cmf.balance_due) postpaid_balance, acct_map.external_id from BMF, CMF, acct_map where TO_CHAR (bmf.trans_date, 'YYYY MM DD') = '1996 08 14 'and making payments as bmf.account_no = Cmf.account_no and acct_map.account_no = bmf.account_no by group bmf.account_no, acct_map.external_id
Have you already tried to run your selected query? I guess that there is no account in Table ACT_map which matches the account number in BMF or CMF, please check that your query looks correct, so a data appears like a problem.
Comments
Post a Comment