Quote:
Originally Posted by amitpatel66
Nana,
This forum is to help peoples with all their technical problems in different technologies.
We are glad to help peoples finding solution for their issues and we are not here to do business :)
So you can feel free and ask us anything in any technology.
So coming to your problem, What I understand from your explanation is:
If extract = 1 THEN new table should be created with name data_design_spec ie
-
-- This is just a pseudo code and not exact oracle source code
-
-
IF (extract = 1) THEN
-
CREATE table data_design_spec;
-
Now could you please explain the second part ie what you need to do with the "source" from table 2??
Thanks for the response :)
This should be the end result of the new table structure
create table "OBJ_TYPE"
name varchar2(100) not null,
description varchar2(400) null,
and so forth.....
The ONLY columns that are to be hard coded are NAME and DESCRIPTION for each new table and the other columns are to be dynamically created based on the values in exisiting tables
Based on the EXISTING table structure I need to create NEW tables dynamically through code based on conditions of the EXISTING tables.
Example of the EXISTING tables are
Table 1
Name: Obj_Type
Columns
obj_type Id obj_type_nm
1 Data_Design_Spec
2 Logical_Data_Model
3 Entity
Table 2
Name: Property
Columns
prpt_id prprt_nm
1 Source
2 Discoverable
3 Required
Table 3
Name: Attribute
Columns
1. ERP_NO
2. Revision
3. Release
Datatype Column
1. String
Property Datatype Size
1. 2000
Example I would need to pull out from EACH table the column name based on condition EXAMPLE ERP_NO =1, Datatype Column, String =1 and Property Datatype Size =1 which would be 2000, Please note there are more data in the columns and fields, but I just wanted to include only a small portion of the data as an example.
the output would be something like this it would return a NEW TABLE STRUCTURE like the example below..based on SQL code.
Create table "Attribute"
Name varchar2(100)
Description varchar2(400)
Datatype String(20)