Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 PL/SQL T-SQL Help please!

Author  Topic 

davewrx
Starting Member

3 Posts

Posted - 2012-04-19 : 12:20:04
Write PL/SQL or T-SQL procedures to accomplish the following tasks:

a. Obtain the name and credit limit of the customer whose number currently is stored in
I_CUSTOMER_NUM. Place these values in the variables I_CUSTOMER_NAME and
I_CREDIT_LIMIT, respectively. Output the contents of I_CUSTOMER_NAME and
I_CREDIT_LIMIT.

b. Obtain the order date, customer number, and name for the order whose number currently
is stored in I_ORDER_NUM. Place these values in the variables I_ORDER_DATE,
I_CUSTOMER_NUM and I_CUSTOMER_NAME, respectively. Output the contents of
I_ORDER_DATE, I_CUSTOMER_NUM, and I_CUSTOMER_NAME.

c. Add a row to the ORDERS table.


Here are all the tables that will help you answer these questions.

REP TABLE
REP_NUM, LAST_NAME, FIRST_NAME, STREET, CITY, STATE, ZIP, COMMISSION, RATE

CUSTOMER TABLE
CUSTOMER_NUM, CUSTOMER_NAME, STREET, CITY, STATE, ZIP, BALANCE, CREDIT_LIMIT, REP_NUM

ORDERS TABLE
ORDER_NUM, ORDER_DATE, CUSTOMER_NUM

ORDER_LINE TABLE
ORDER_NUM, PART_NUM, NUM_ORDERED, QUOTED_PRICE

PART TABLE
PART_NUM, DESCRIPTION, ON_HAND, CLASS, WAREHOUSE, PRICE

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2012-04-19 : 13:25:47
Homework?
What have you tried so far?









How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-04-19 : 13:26:28
1. Dupe of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=173756
2. As mentioned in the other thread, we don't answer homework or exam questions on SQLTeam.
3. We're also a Microsoft SQL Server website, and can't answer PL/SQL questions at all. Try http://dbforums.com/
Go to Top of Page
   

- Advertisement -