I need help writing my PL/SQL code into SQLJ code. I don't understand how SQLJ works, and i'm really struggling with the PL/SQL. Here's what I need to do: 1. Write an SQLJ program that (a) will prompt the user for an old zipcode value and a new zipcode value; and (b) change all occurrences of the old zipcode value in the tables of the mail-order database to the new zipcode value ***My solution in PL/SQL*** ACCEPT oldZip PROMPT 'Enter old zipcode: ' ACCEPT newZip PROMPT 'Enter new zipcode: ' declare aCity [url removed, login to view]%TYPE; begin select CITY into aCity from ZIPCODES where ZIP = &oldZip; insert into ZIPCODES values(&newZip, aCity); update CUSTOMERS set ZIP = &newZip where ZIP = &oldZip; update EMPLOYEES set ZIP = &newZip where ZIP = &oldZip; delete from ZIPCODES where ZIP = &oldZip; end; / 2. For this question, you need to have the ODETAILS table of the mail-order database set up in your hawk Oracle account. Initially, the COST column of the ODETAILS table must be all NULLs. The value of COST of a row of table ODETAILS is the product of the quantity and price of the product ordered. The price of a product is stored in the PRODUCTS table. Assume that you do not have the table PRODUCTS in your account and you must access the PRODUCTS table of my hawk Oracle account Write an SQLJ program that have two database connections to the hawk Oracle database. One is for connecting to your Oracle account and the other for connecting to my Oracle account. Your program uses the connection to my account to access the table PRODUCTS to obtain the needed information to update the COST column of all rows in table ODETAILS. My solution: alter table ODETAILS drop(COST); alter table ODETAILS add(COST number(6,2)); update ODETAILS d set COST = QTY*(select PRICE from PRODUCTS p where [url removed, login to view] = [url removed, login to view]); update ORDERS o set ORDER_COST = (select SUM(COST) from ODETAILS d where [url removed, login to view] = [url removed, login to view]); 3. Write a JDBC program that will compute the total number of rows in all tables in your account. You can obtain all your table names from the system table USER_TABLES. Not sure how to do this one!

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

## Platform

Oracle 8i or 9, and Java needs to run to perform the SQLJ operations

Habilidades: Engenharia, Java, MySQL, Oracle, PHP, Arquitetura de software, Teste de Software

Veja mais: what pl sql, what is a writing prompt, sql oracle pl sql, sql in pl sql, sql code oracle, pl sql in oracle, pl sql and oracle, pl sql and, p.c. connection, oracle sql pl, java obtain, i will help to writing java code, how add price sql user, for in pl sql, for i in oracle pl sql, for all in pl sql, code pl sql, pl sql oracle, p sql, oracle sql number, in pl sql, PNO, oracle:pl, oracle sql p, oracle pl/sql

Acerca do Empregador:
( 1 comentário ) United States

ID do Projeto: #2954782

Concedido a:


See private message.

$42.5 USD em 14 dias
(110 Comentários)