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

Explain the concept of modeling with objects, Explain the concept of Modeli...

Explain the concept of Modeling With Objects A model is a conceptual representation of a specification, design or system from a particular point of view. A modelling language

Architectural standard, Architectural standard: Designation : Archit...

Architectural standard: Designation : Architect , Consultant Job Profile : As a part of Oracle Fusion Middleware at Satyam, I am involved with Presales, Delivery, A

Develop c# schoolproject asap, Develop C# schoolproject ASAP Helping me ...

Develop C# schoolproject ASAP Helping me with schoolproject. The project is prepared in C# and haves a database connection. We have some small issues asking up data from t

Define the term multimedia database, Question : (a) Explain with the h...

Question : (a) Explain with the help of appropriate examples the difference between ‘Data' and ‘Information'. (b) A digital image is an array of pixels, where each pixel h

Differance between procedural and non procedural dml, Differance between pr...

Differance between procedural and non procedural DML? Procedural and non procedural DML Procedural DML exactly what data is require and how to obtain those data. Non procedural

Explain the internal architecture of 8086, Problem 1. Write an assembly...

Problem 1. Write an assembly program to find the smallest among two numbers Writing an assembly program to find the smallest among two numbers 2. Explain the intern

Create table and insert data manufacturer-dbms, Create a table according to...

Create a table according to given data:  AmbulanceDriver(Driver_Number#, Name, Address, Birth_Date) AmbulanceDriverTeam(Team_Number#, Driver_Number#, Join_Date, Lea

What is the use of with clause in sql, What is the use of with clause in SQ...

What is the use of with clause in SQL? The with clause gives a way of defining a temporary view whose explanation is available only to the query in which the with clause occurs

Advantages of Observation Methods, Advantages of Observation  Methods: ...

Advantages of Observation  Methods: Bailey has pointed  out four  advantages of observation: 1. Superior in Data  Collection  on Non Verbal Behavior: When  a person  a opi

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