📖 generic · CBSE Class 11 English medium · ACCOUNTANCY · Page 40question

relation. Whenever vouchers and details relations are used in a query, the

Chapter 14: Structuring Database for Accounting · ACCOUNTANCY

relation. Whenever vouchers and details relations are used in a query, the use of Vno attribute must precede the name of relation or its alias name. For example, ( ) Retrieve a list of accounts and the amounts debited because of cash payments. The Cash Account code begins with “ ”.

( Model-I ) Narration , Debit As Code, Amount Vouchers Credit LIKE “ *” ; ( Model-II ) Narration, AS Code, Amount Vouchers AS V , Details AS D tType= AND V.vNo=D.vNo AND like “ *” UNION Narration,Code, Amount Vouchers AS V, Details AS D tType = AND V.vNo = D.vNo AND code LIKE “ *” ; ( ) To retrieve a detailed list of all accounts, giving their code, Name and category. ( Model-I and Model-II ) SELECT Code, Name, Category FROM Accounts, AccountType WHERE CatId = Type ( ) To retrieve a detailed list of all account, giving their code, Name and category, which have been debited ( Model-I ) DISTINCT Debit AS Code, Name, Category Vouchers AS V,Accounts AS A, AccountType V.Debit = A.Code AND CatId = type ( Model-II by using query solution saved as DebitAccounts in Q.No: ) SELECT Code, Name, Category FROM DebitAccounts AS D, Accounts AS A, Category WHERE D.Code = A.Code AND Type = CatId ( ) To retrieve Code, Name and Category of Expense accounts which have been debited ( Model-I ) Debit AS Code, Name, Category Vouchers, Accounts, AccountType Debit = Code AND Type = CatId AND Category = “Expenses” ( Model-II by using query solution saved as Debit Accounts in Q.No: ) D.Code, Name, Category DebitAccounts AS D, Accounts AS A, AccountType D.Code = A.code AND Type = CatId AND Category = “Expenses” ( ) To retrieve Narration and Amount of transactions where Expense head “Carriage Inwards” has been debited. ( Model-I ) Narration , Amount Vouchers , Accounts Debit = Code AND Name LIKE “Carriage Inw*” ; ( Model-II by using query solution saved as DebitAccounts in Q.No: ) Narration, Amount Details AS T,DebitAccounts AS D, Accounts AS A T.Code = D.Code AND D.Code = A.Code AND Name LIKE “Carriage Inw*”

Related topics

Have a question about this topic?

Get an AI answer grounded in your actual textbook — with the exact page reference.

Ask AI about this topic →