Write a program within embedded sql to associative relation, Database Management System

Assignment Help:

Write a program within embedded SQL to associative the total trip expenses of the salesman named ‘John' for the relations.

EXEC SQL BEGIN DECLARE SECTION;
long total_expenses;
EXEC SQL END DECLARE SECTION;
EXEC SQL
SELECT SUM(AMOUNT) INTO :total_expenses FROM EXPENSE WHERE TRIPID
IN (SELECT TRIP_ID FROM TRIP
WHERE SSN = (SELECT SSN FROM SALEPERSON WHERE NAME = ‘John'));
printf("\nThe total trip expenses of the salesman John is: %ld", total_expenses);


Related Discussions:- Write a program within embedded sql to associative relation

Keys, #questiontypes of keys examples..

#questiontypes of keys examples..

Job scheduling strategy, 1) Define a job scheduling strategy that will meet...

1) Define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a pict

Dbms built for online transaction processing, Problem: A DBMS built for...

Problem: A DBMS built for Online Transaction Processing (OLTP) is usually regarded as unsuitable for data warehousing. Each system is designed with a different set of requireme

What is distributed system, What is Distributed system ? Distributed S...

What is Distributed system ? Distributed System - A distributed system consists of a number of processing parts in which are interconnected through a computer network and in

Reasons for the growing popularity of data mining, Question: Data Minin...

Question: Data Mining is the process of extracting knowledge hidden from large volumes of raw data. (a) Using a suitable example, illustrate how Data Mining can be useful t

Explain saving derived attributes to avoid re-computation, Saving Derived A...

Saving Derived Attributes to Avoid Re-computation   As discussed, "redundancy means duplication of exact data". But, if multiple copies of same data are present in the system,

What are called index-sequential files, What are called index-sequential fi...

What are called index-sequential files? The files that are ordered sequentially with a primary index on the search key are known as index-sequential files

Non-query optimisations, Part: Recommended (Non-query) Optimisations Thi...

Part: Recommended (Non-query) Optimisations This section entitled "Recommended (non-query) optimisations" should be a brief report containing recommended optimisations you would

Design and prototype, This assignment is worth 45% of your final grade for ...

This assignment is worth 45% of your final grade for this module.  Marks will be awarded as follows: Prototypes (wireframe and web based prototype) You are expected

Need for distributed database systems, Need For Distributed Database System...

Need For Distributed Database Systems A distributed database is a set of database kept on multiple computers that appears to applications as a one database. As a result, an app

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd