December 10, 2010

Create Table form a Report

I got a Scenerio that to create a table and insert values through a concurrent program:

To achieve this,we can do the fallowing:
1.create a procedure in DB to create a table
CREATE OR REPLACE PROCEDURE Create_Table
(errbuf      OUT VARCHAR2,retcode   
OUT VARCHAR2) IS
BEGIN
   Create table table_name(column_name);
END Create_Table;
2.Register this procedure in application as pl/sql stored procedure
3.Now run the program and it will create a table in DB
Now we can call this procedure in our reports sql query so while running the report we can create the table.
select Create_Table(Procedure name) from dual;

No comments:

Post a Comment

Thanks for your comments submitted.,will review and Post soon! by admin.

COALESCE-SQL

Coalesce- return the null values from the expression. It works similar to a case statement where if expression 1 is false then goes to expr...