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
Insulation between conceptual and physical structures It can be defined as: 1. The Database Administrator should be capable to vary the storage structures without affectin

a publishing company produce scientific books on various subjects. the books are written by authors who specialize in one particular subject. the company employs editors who, not n

Explain the concept of QBE? Query-by-example represents a visual/graphical approach for accessing information in a database by the use of query templates called as skeleton tab

The First Normal Form (1NF) Let us first describe 1NF: Definition: A relation (table) is in 1NF if 1.      There are no duplicate tuples or rows in the relation. 2.

What is OCR? OCR (Optical Character Recognition) is a technology that enables you to change different types of machine-readable documents, like scanned paper documents, PDF fil

Explain Deadlock detection and recovery Deadlock Detection - A deadlock is said to take place when there is a circular chain of transaction, every waiting for the release of a

Copy Data from One Database to another Database Project Description: I am having two MySQL databases with same tables. I just need to copy one Data from one to another dat

UNION If R1 and R2 are two union compatible relations then R3 = R1 ∪ R2 is the relation having tuples that are either in R1 or in R2 or in both. In case, R3 will have tuples

Give the general form of SQL query? Select  A1, A2............., An From  R1, R2..............., Rm Where  P

What was the method in which records are physically stored in a specified order according to a key field in each record ? A method in which records are physically stored within