View previous topic :: View next topic
|
Author |
Message |
esrraju
New User
Joined: 19 Feb 2007 Posts: 9 Location: India
|
|
|
|
Could anyone please write a query for me ...
I need the Account numbers pressent in CC_CLNTCLNT_ACCT but not in CC_CLNT_ACCT tables, by validating these 3 cols present in both tables. ABA_BSB_STAT_I
ABA_BSB_BRCH_I
CC_ACCT_N
The account numbers is the combination of above 3 cols. |
|
Back to top |
|
|
zero
New User
Joined: 01 Dec 2007 Posts: 21 Location: Hyderabad
|
|
|
|
Can you give an example ? |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
select ABA_BSB_STAT_I||ABA_BSB_BRCH_I||CC_ACCT_N as account
from CC_CLNTCLNT_ACCT A where not exists
(select * from CC_CLNT_ACCT b where a.ABA_BSB_STAT_I = b.ABA_BSB_STAT_I
and a.ABA_BSB_BRCH_I = b.ABA_BSB_BRCH_I and a.CC_ACCT_N = b.CC_ACCT_N) |
|
Back to top |
|
|
shrivatsa Warnings : 1 Active User
Joined: 17 Mar 2006 Posts: 174 Location: Bangalore
|
|
|
|
Here is the query for you,
Code: |
SELECT ACCOUNT_NUM FROM
CC_CLNTCLNT_ACCT A,
CC_CLNT_ACCT B
WHERE A.ABA_BSB_STAT_I = B.ABA_BSB_STAT_I
AND A.ABA_BSB_BRCH_I =B.ABA_BSB_BRCH_I
AND A.CC_ACCT_N = B.CC_ACCT_N |
I think I have given you the right query..
If not can you please provide example... |
|
Back to top |
|
|
zero
New User
Joined: 01 Dec 2007 Posts: 21 Location: Hyderabad
|
|
|
|
Can you give an example ? |
|
Back to top |
|
|
Richa Jain
New User
Joined: 18 Mar 2008 Posts: 35 Location: Gurgaon
|
|
|
|
Quote: |
The account numbers is the combination of above 3 cols. |
Is the Acct No = ABA_BSB_STAT_I + ABA_BSB_BRCH_I + CC_ACCT_N ?
eg: ABA_BSB_STAT_I = 1234
ABA_BSB_BRCH_I = 567
CC_ACCT_N = 890
Acct No = 123456789
Try this.
Code: |
SELECT ACCOUNT_NUM FROM
CC_CLNTCLNT_ACCT A,
CC_CLNT_ACCT B
WHERE A.ABA_BSB_STAT_I <> B.ABA_BSB_STAT_I
AND A.ABA_BSB_BRCH_I <> B.ABA_BSB_BRCH_I
AND A.CC_ACCT_N <> B.CC_ACCT_N |
|
|
Back to top |
|
|
|