General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Yuri:
Sorry, I didn't say all the restrictions.
- I must use an unique (principal) index, for referential integrity
- I can't PACK any table, I'm working in a shared environment, so can't open any table EXCLUSIVEily.
- To be exact, the key is not field (so I cant generate it), but a combination of two tables-key user selects. User can select them once, then delete, and select the two tables-key again (then is when problem occurs).
- That's exactly what I want to do but, remember: Im working on a view. How do I know that the record I inserted in view exists on the table (and marked as deleted on table) before I throw my TABLEUPDATE?? :(
>There are a few possible solutions:
>- make index not unique,
>- pack table as often as possible to remove deleted records,
>- when delete set procedure to replace the key with some unique identifier differs from what you use for this key
>- (that is what I prefer) check for user input before update and do adequate changes in the table, like recall deleted record and replace values with new entered by user, or replace key for deleted or set procedure to update key properly when inserting,....
>Best Wishes
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only