This is a problem that is killing me. It is a school assignment and I can't figure it out so any help will be great. I have eleven questions, and I have five of them answered.
I have these tables with these fields:
Table:sales_rep
Columns:Last|First|Street|City|St|Zip_Code|Total_Commision|Commision_Rate
Table:customer
Columns:Last|First|Street|City|St|Zip_Code|Balance|Credit_Limit|slsrep_number
Table:part
Columns: Part_number|part_description|Units_on_hand|it|warehouse_number|unit_price
Table:orders
Columns:Order_Number|order_date|customer_number
Table:order_line
Columns:Order_Number|part_number|number_ordered|quoted_price
Now here is my questions along with the ones I have answers to.

Find the last name and first name for every customer who has a credit limit of at least $800.

select last,first from customer while credit_limit>799;

Give the order number for every order placed by customer number 124 on 9/05/1998.

select order_number from orders while order_date='05-SEP-02';

List the customer number, last name, and first name for every customer represented by sales rep 03 or sales rep 12.

select customer_number,last,first from customer while slsrep_number=3 and slsrep_number=12;

List the part number and part description for every part that is not in item class HW.

select part_number,part_description from part when it <>'HW';

List the part number and part description for every part that has between 100 and 200 units on hand.

select part_number,part_description from part where units_on_hand>99 and units_on_hand<201

From here I'm lost can anyone give me some help. Please.
List the name of all customers who has a balance less than their credit limit.

select last,first from customer where balance<credit_limit;

For every order, list the order number, order date, part number, part description, and number of units ordered.

Find the customer number, last name nad first name for every customer who currently has an order on file for an iron.

List the part description, part number, order number and order date for every order placed by Mary Nelson that does not contain an order line for a treadmill. You must use the set operation of minus to do this problem.

List the order number and order date for every order that was placed by Mary Nelson or that contains an order line for an iron. You must use the set operation of union to do this problem.

List the order number and order date for every order that was placed by Mary Nelson and contains an order line for an iron. You must use the set operation of intersection on this problem.

I think you are trying to redefine SQL with your own bunch of syntax. What are those WHILE and WHEN in your code ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.