zimmer9
asked on
How to create a new table based on the joining of 2 table using a query in SYBASE?
How would you join 2 tables to get the detail records in table tblOpenItemsAgeRange plus the ENTITY field in
table tblBanks and insert the RESULT SET into a new table titled tblConsolidate ?
The tables can be joined on the key field:
Table tblBanks has a key field Bank field type text size 4
Table tblOpenItemsAgeRange has a key field BANKCODE field type text size 4
For ex:
tblOpenItemsAgeRange
-------------------------- -------
Bank T AgeRange $ Items
0031 A 1-5 60 2
0040 B 6-10 10 1
tblBanks
-------------
BANKCODE ENTITY
0031 PAYROLL
0040 ISG
RESULT TABLE tblConsolidate
Bank T AgeRange $ Items ENTITY
0031 A 1-5 60 2 PAYROLL
0040 B 6-10 10 1 ISG
table tblBanks and insert the RESULT SET into a new table titled tblConsolidate ?
The tables can be joined on the key field:
Table tblBanks has a key field Bank field type text size 4
Table tblOpenItemsAgeRange has a key field BANKCODE field type text size 4
For ex:
tblOpenItemsAgeRange
--------------------------
Bank T AgeRange $ Items
0031 A 1-5 60 2
0040 B 6-10 10 1
tblBanks
-------------
BANKCODE ENTITY
0031 PAYROLL
0040 ISG
RESULT TABLE tblConsolidate
Bank T AgeRange $ Items ENTITY
0031 A 1-5 60 2 PAYROLL
0040 B 6-10 10 1 ISG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.