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

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);

Posted Date: 5/10/2013 4:07:28 AM | Location : United States







Related Discussions:- Write a program within embedded sql to associative relation, Assignment Help, Ask Question on Write a program within embedded sql to associative relation, Get Answer, Expert's Help, Write a program within embedded sql to associative relation Discussions

Write discussion on Write a program within embedded sql to associative relation
Your posts are moderated
Related Questions
to develop elrctronic database from manual forms

What is a recovery scheme? An integral part of a database system is a recovery scheme that can restore the database to the reliable state that existed before the failure.

Why a report generator is used ? Report generator is used for print files on paper.

In the first unit of this block, you have been given with the details of the Database Management System, its structure, advantages etc. This unit is an attempt to give you informat

Explain the concepts of relational data model? Relational Data Model - The relational model was first introduced through Prof. E.F. Codd of the IBM Research in the year 1970

What do you understand by RAID? Explain RAID Level 4 and Level5? RAID - It is stands for Redundant Array of Inexpensive Disks (as named by the inventor), or alternatively Re

A database has been designed for this beauty parlour in order for the staff to manage specific things such as bookings made by clients, payments, staff availability, level of exper

comparison of oracle RDBMS with MySQL

2NF Normal Form : A relation schema process R is in 2NF if it is in 1NF and each non-prime attribute A in R is fully functionally related on primary key. Second normal form (2N

Question 1 Discuss about second normal form and third normal form Question 2 Write short note on                        1) Data Manipulation Language 2) Data Definition La