Current Position:Home > Operates on two table using procedure

Operates on two table using procedure

Update:11-30Source: network consolidation
Advertisement
i want to handle two table using procedure in oracle 10g. i have created a procedure like this
CREATE OR REPLACE PROCEDURE sold_car1(
sid soldcar.sold_id%TYPE,
cid soldcar.id%TYPE,
cuid soldcar.customer_id%TYPE,
eid soldcar.emp_id%TYPE,
d soldcar.dat%TYPE
) IS
BEGIN
INSERT INTO soldcar VALUES(sid,cid,cuid,eid,to_date(d,'yyyy/mm/dd'));
DELETE FROM pcar where id=cid;*
COMMIT;
END sold_car1;
SHOW ERRORS
i have found some errors. how can i do this.

The Best Answer

Advertisement
hi
the errors are something like this ''the procedure is created with some errors''.
actually i want to pass 4 parameters in the procedure that will insert in one table and among the 4 parameters by using one parameter i want to delete one row of another table.
INSERT INTO soldcar VALUES(sid,cid,cuid,eid,to_date(d,'yyyy/mm/dd')); //soldcar is first table
DELETE * FROM pcar where id=cid; //pcar is second table
  • Operates on two table using procedure Update:11-30

    i want to handle two table using procedure in oracle 10g. i have created a procedure like this CREATE OR REPLACE PROCEDURE sold_car1( sid soldcar.sold_id%TYPE, cid soldcar.id%TYPE, cuid soldcar.customer_id%TYPE, eid soldcar.emp_id%TYPE, d soldcar.dat

  • How to update the data in sqlserver table using procedure in biztalkserver Update:10-11

    Hi, Please can any one answer this below question how to update the data in sqlserver table using procedure in biztalkserver while am using executescalar,typedprocedure getting some warning Warning:The adapter failed to transmit message going to send

  • XSD from Database table/view/procedure Update:11-30

    Hi all, Does anyone know of a tool or framework which enables generation of XSD's out of a Database table/view/procedure?Hi Naval, It depends on whether you created a BOL model for your Z-table or not. If you don't have a BOL model, then all you can

  • List of unused tables and procedures Update:11-30

    Hi, I am in the task of clean up of tables. I need to find the list unused tables and procedures. Is there any way where i can find when was the last time the table queried? Also, Can you please give sql query to find the list of unused tables and pr

  • How to create table using Procedure Update:11-30

    Hi, I want to create table using procedure . How to write procedure for the table creation? thanks in advance.Use dynamic sql or DBMS_UTILITY.EXEC_DDL_STATEMENT: SQL> desc tbl1 ERROR: ORA-04043: object tbl1 does not exist SQL> begin   2      execute

  • EXPORT SCHEMA 'S ALL TABLES AND PROCEDURES BY EXPDP Update:11-30

    how i can export schema's all tables and procedures using expdp. when i am giving expdp usr/pass schemas=scott directory=export_dir dumpfile=280606.DMP logfile=280606.log tables=* but it is giving error. pls help regards PrabhakerYou only need to spe

  • Accessing Remote machine table in procedure .. Update:11-30

    Hi All I want to access table from another machines user in procedure .How to achieve this task. For e.g I want to access table PROCESS from DEMO user which is at 192.168.1.255 host. How to access such user and table in procedure thanking you Gaurav

  • How i will pass table within procedure Update:11-30

    how i will pass table within procedure and call another procedure. can anybody give some exampleYou are not specific at all. Do you mean you want to pass table_name as parameter to a procedure? Do you want to pass tables_name dynamically while the pr

  • Use of global temporary tables in Procedures Update:10-11

    Hi I am using global temporary tables in the procedures. Loading data in the same table through many procedures. I am fetching the data from the global temporary table in PRO-C by a cursor. Will this degrade performance? Please help me.. Thanks in Ad

  • How to update multiple records in a table using procedure? Update:10-11

    Dear All, 1 am using 11.1.2.1.0 my question is i have a table like emp id(primary key), empname,location 1                             damby      blore 2                             rocky       kormangala 3                              biswa     indi