powered by CADENAS

Manual

Manual

5.2.3.2. Basisfunktionalität

sql_connect SYSADM,SYSADM

ERPTABLE

sql_execute create table ERPTABLE (/
ERP_PDM_NUMBER varchar (50) not null,/
DESCRIPTION varchar (200),/
MAT_NAME varchar (100),/
primary key (ERP_PDM_NUMBER))
sql_execute create public synonym ERPTABLE for SYSADM.ERPTABLE
sql_execute grant all on ERPTABLE to PUBLIC

Bedeutung der einzelnen Felder:

erp_pdm_number: Fremdschlüssel (ERPTABLE)
alle selbst zugefügten Felder/Spalten werden Teil der ERPTABLE.
Z.B. Description, Material, Oberfläche.

LINKTABLE

sql_execute create table LINKTABLE (/
PRJ_PATH varchar (500) not null,/
LINE_ID integer not null,/
LINE_SUBID integer not null,/
VERSION varchar(5) not null,/
ACTIVE_STATE smallint default 0 not null,/
REQUESTED_STATE smallint default 0 not null,/
VARSET varchar (4000) ,/
VARIANT integer default 0,/
ERP_PDM_NUMBER varchar (50),/
foreign key ERP_FK (ERP_PDM_NUMBER) references ERPTABLE,/
primary key (PRJ_PATH,LINE_ID,LINE_SUBID,VERSION))
sql_execute create public synonym LINKTABLE for SYSADM.LINKTABLE
sql_execute grant all on LINKTABLE to PUBLIC

Bedeutung der einzelnen Felder:

erp_pdm_number_linktable: Primärschlüssel (LINKTABLE)
prj_path: Projektpfad
varset: Alle Variablen zusammengefasst in einem String
line_id: Line identifier
subline_id: Unterzeile, um Varianten hochzuzählen
version: Anzahl der Versionen
variant: Wert 0 oder 1 / Variante ja oder nein
active_state: aktueller Status
requested_state: beantragter Status
LINKTABLE und ERPTABLE sind über Primärschlüssel und Fremdschlüssel verbunden.