Hi All,
After some serious head banging I determined that a table with a DEFAULT
SERIAL field will not allow you to add records in a Form Dialog. Is there
a reason for this or is it a bug? If it is a bug, is there am appropriate
place to file a bug report?

On the FK cascade delete, why is it implemented where the definition is
specified on the "many" side of a one-to-many. If I have tables GROUP and
GROUPITEMS and need the related group items deleted when a particular
GROUP is deleted, wouldn't it make since to define this in the GROUP
table? If I were going to use a trigger, this is where it would go (I
assume this as I haven't messed with triggers on SAPDB yet). I am just
curious about this as it seems counter-intuitive and I spent much time
trying to get this relation set up. Which bring me to:

When trying to set up this relation in the manner that I though was
appropriate I did:
CREATE TABLE "SA"."USEDEQUIPMENTGROUPS" (
        "GROUPID"  Integer NOT NULL DEFAULT SERIAL (1),
        "GROUPDATE"  Date NOT NULL,
        "GROUPFILE"  Varchar (50) ASCII NOT NULL,
        PRIMARY KEY ("GROUPID") )
 CREATE TABLE "SA"."USEDEQUIPMENTITEMS" (
        "ITEMID"  Integer NOT NULL DEFAULT SERIAL (1),
        "GROUPID"  Integer NOT NULL,
        "HIDEITEM"  Boolean NOT NULL DEFAULT FALSE,
        "ROWDATA"  Long ASCII,
        PRIMARY KEY ("ITEMID") )
 CREATE INDEX "IX_GROUPID" ON "SA"."USEDEQUIPMENTITEMS"("GROUPID" ASC)


ALTER TABLE "SA"."USEDEQUIPMENTGROUPS" FOREIGN KEY "FK_GROUPID"
("GROUPID") REFERENCES "SA"."USEDEQUIPMENTITEMS" ("GROUPID") ON DELETE
CASCADE

I would receive this error (which was driving me crazy!) :
General error;-8030 POS(1) Column must be indexed.

While I now understand how SAPDB expects the FK-cascade-delete relation to
be set up, I'm wondering is the manner in which I was attempting to define
it should have either give a different error or if it should have actually
worked (though not acted like I would expect) and that this is a bug.

Anyway, thanks for the opportunity to use such a world-class DB system!

Take care,

John

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to