Master/Detail Table
Hello somebody
I have a Master/Detail Table relationship
Follow the description of the Mastertable:
CREATE TABLE REZ_LOG_KK_HEAD (
SPS_NODE SMALLINT DEFAULT 10 NOT NULL,
KK_BEZ VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UTF8,
"VERSION" SMALLINT DEFAULT 0 NOT NULL,
KK_NR INTEGER NOT NULL,
KUNDE VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8,
AENDERUNG_DURCH VARCHAR(20) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UTF8,
AENDERUNG_AM TIMESTAMP DEFAULT 'NOW' NOT NULL,
ZUSATZINFO VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8,
RFID_IDENT VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8,
RFID_FIXCODE SMALLINT DEFAULT 0 NOT NULL,
AENDERUNGSGRUND VARCHAR(80) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UTF8,
STATUS SMALLINT DEFAULT 0 NOT NULL);
Follow the description of the Detailtable:
CREATE TABLE REZ_LOG_KK_ITEM (
SPS_NODE SMALLINT NOT NULL,
KK_BEZ VARCHAR(50) CHARACTER SET UTF8 NOT NULL COLLATE UTF8,
"VERSION" SMALLINT NOT NULL,
PARAMETER_NR SMALLINT DEFAULT 0 NOT NULL,
WERT DOUBLE PRECISION DEFAULT 0.0 NOT NULL,
ENTRY_MIN DOUBLE PRECISION DEFAULT '0' NOT NULL,
ENTRY_MAX DOUBLE PRECISION DEFAULT '0' NOT NULL);
The Detailtable stores a subset of different versions, i should print out just the difference of each subset version of the Detailtable! But the Table conains the full (all parameter! also these parameter there are not changed!!)
Does somebody have me a hint, how i could solve my problem??
Thanks.
Gregor
I have a Master/Detail Table relationship
Follow the description of the Mastertable:
CREATE TABLE REZ_LOG_KK_HEAD (
SPS_NODE SMALLINT DEFAULT 10 NOT NULL,
KK_BEZ VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UTF8,
"VERSION" SMALLINT DEFAULT 0 NOT NULL,
KK_NR INTEGER NOT NULL,
KUNDE VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8,
AENDERUNG_DURCH VARCHAR(20) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UTF8,
AENDERUNG_AM TIMESTAMP DEFAULT 'NOW' NOT NULL,
ZUSATZINFO VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8,
RFID_IDENT VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8,
RFID_FIXCODE SMALLINT DEFAULT 0 NOT NULL,
AENDERUNGSGRUND VARCHAR(80) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UTF8,
STATUS SMALLINT DEFAULT 0 NOT NULL);
Follow the description of the Detailtable:
CREATE TABLE REZ_LOG_KK_ITEM (
SPS_NODE SMALLINT NOT NULL,
KK_BEZ VARCHAR(50) CHARACTER SET UTF8 NOT NULL COLLATE UTF8,
"VERSION" SMALLINT NOT NULL,
PARAMETER_NR SMALLINT DEFAULT 0 NOT NULL,
WERT DOUBLE PRECISION DEFAULT 0.0 NOT NULL,
ENTRY_MIN DOUBLE PRECISION DEFAULT '0' NOT NULL,
ENTRY_MAX DOUBLE PRECISION DEFAULT '0' NOT NULL);
The Detailtable stores a subset of different versions, i should print out just the difference of each subset version of the Detailtable! But the Table conains the full (all parameter! also these parameter there are not changed!!)
Does somebody have me a hint, how i could solve my problem??
Thanks.
Gregor