Advertisement
| Hall of Fame |
|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: |
---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,
);
|