We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
---The only columns and datatypes are to be hardcoded that will be inserted into each new table structure are below: This is example of a SQL statement to hard code the columns NAME AND DESCRITION. PLEASE NOTE: OBJ_TYPE_NAMES ARE IN THE obj_type TABLE ONLY**** SQLstatement = "create table" + obj_type_nm SQLstatement = SQLstatement " "\n" + "(" SQLstatement = SQLstatement " "\n" + "name varchar2(100) not null," SQLstatement = SQLstatement " "\n" + "description varchar2(400) null" The CODE should work like this: Loop through each existing table and first find the NEW TABLE NAME from the OBJ_TYPE Table which would be <DESIGN_SPECIFICATION> Based on THE FIRST ID NUMBER "OBJ_TYPE_ID" = 1 Then the code should find the NEXT TABLE "OBJ_TYPE_RLTNSHP" and extract the COLUMN value from the column named OBJ_TYPE_NM based on the OBJ_TYPE_ID = 1 WHICH WOULD BE in this case <DATA TYPE> Then the code should go to the last table based on the same parameters in the next table "PRPRT" and extract the column value from the column name "prt_nm" where OBJ_TYPE_ID =1 which would be in this case <ERP_NO> and so forth, this is just and EXAMPLE ***PLEASE FEEL FREE TO CHANGE THE SQL statements, I was just trying to figure out a way to hard code the name and description columns since they should generate in every table. These are the EXISTING TABLES which we will be extracting the NEW table NAME and columns, datatypes and attributes. Table Name: Obj_Type Coulumn1 Column2 Obj_type_ID Obj_type_nm 1 Design_Specification 2 Attribute 3 Entity Table Name:OBJ_TYPE_RLTNSHP Column1 Column2 Column3 OBJ_TYPE_ID Data Type Obj_type_mndtry_in 1 FK String 2 PK String 3 REQUIRED Number Table Name: Prprt Column1: Column2 Column3 prt_id prt_nm prt_size 1 erp_no 100 2 release 200 3 version 50 --Results of the Create Table STATEMENTS would return a table structure similar below: Create Table Data_Specification Name Varchar(200) not null, Description varchar2(400) null, Data Type String(20) not null, FK String(1) not null, PK String(1) not null, Required string(1) not null ); Create Table Attribute Description varchar2(400) null, Data Type String(20) not null, ERP_NO String(100) not null, Release String(200) not null, Version String(50) not null, );