anthony.green - Tuesday, February 21, 2017 7:54 AM
Bydefinition, a table must have a key. Yet you post things that cannever, ever have a key, because all the columns are NULL.
Yourinsanely large “description_<nothing in particular>†seemsto be a code or type of transaction. We both know that your choice ofan insanely large VARCHAR(50) involved no research or planningwhatsoever. If you done it right. By the way there would be a checkconstraint limiting this column to the valid values that could fit init.
Thereis no such crap as a “sequence_nbr†in in RDBMS; it has to be a“<something in particular>_seqâ€, such as invoices, checks,whatever. You might want to look up the create sequence statement inSQL. If this actually is a sequence.
Whydo you think budget is a valid data element name? Is it a type code?A quantity? What?
Whydo you think “apportion†(of what?) is a valid data element name?It looks to be a quantity, but it lacks what ISO 11179 calls anattribute property.
Finally,“nominal†is an adjective, not even a noun! I also see that it ishuge. Were these the defaults from an old ACCESS or Xbase schema?
Myguess is that the key is (generic_id, something_seq), but I have noconstraints or proof that this guess is correct.
Mostof the work in SQL is done in the DDL, so I would suggest you throwout what you have got and start over with the correct design. Thislooks like someone transcribed a series of notes of a yellow pad intoan improper table declaration. Would you like to try again?
Bydefinition, a table must have a key. Yet you post things that cannever, ever have a key, because all the columns are NULL.
Yourinsanely large “description_<nothing in particular>†seemsto be a code or type of transaction. We both know that your choice ofan insanely large VARCHAR(50) involved no research or planningwhatsoever. If you done it right. By the way there would be a checkconstraint limiting this column to the valid values that could fit init.
Thereis no such crap as a “sequence_nbr†in in RDBMS; it has to be a“<something in particular>_seqâ€, such as invoices, checks,whatever. You might want to look up the create sequence statement inSQL. If this actually is a sequence.
Whydo you think budget is a valid data element name? Is it a type code?A quantity? What?
Whydo you think “apportion†(of what?) is a valid data element name?It looks to be a quantity, but it lacks what ISO 11179 calls anattribute property.
Finally,“nominal†is an adjective, not even a noun! I also see that it ishuge. Were these the defaults from an old ACCESS or Xbase schema?
Myguess is that the key is (generic_id, something_seq), but I have noconstraints or proof that this guess is correct.
Mostof the work in SQL is done in the DDL, so I would suggest you throwout what you have got and start over with the correct design. Thislooks like someone transcribed a series of notes of a yellow pad intoan improper table declaration. Would you like to try again?
Please post DDL and follow ANSI/ISO standards when asking for help.