D
Dawn
I have a table 1, information of customer, primary key custID;
Table 2 , information of accounts, primary key account number, one account
number is under one custID.
Try to link two tables to generate a query with all the fields of table
1,also to add a new field called accountType, it’s value includes “None(not
finding respective custID in table2)â€, “Aâ€(the accounttype is asset), “Lâ€
(the accounttype is Liability),â€A/L†(under the same custID there are
accounts covered accounttype Liability and Asset) .
How to write it in sql? Many thanks.
Table 2 , information of accounts, primary key account number, one account
number is under one custID.
Try to link two tables to generate a query with all the fields of table
1,also to add a new field called accountType, it’s value includes “None(not
finding respective custID in table2)â€, “Aâ€(the accounttype is asset), “Lâ€
(the accounttype is Liability),â€A/L†(under the same custID there are
accounts covered accounttype Liability and Asset) .
How to write it in sql? Many thanks.