Validation of multirecord block [message #234289] |
Mon, 30 April 2007 13:32 |
mgore
Messages: 4 Registered: April 2007
|
Junior Member |
|
|
Need help in developing multi-record validation logic.
I have master detail kind of form. Based on one of the values on master block I am opening another block for entry. This block will have values like
subject start Date end date
history 01/30/2007 03/31/2007
history 04/15/2007
Geography 02/20/2005
in short there are validation which should check for overlapping dates. There should be validation for duplicate records as well. so based on value of subject I need to validate records with same subject line. I am facing difficulty building logic. any pointers?
Right now I am storing values in temp table for that subject and using that temp table for all validations. Is it good path to follow on?
Can anyone suggest any better / easier approach?
Thx,
|
|
|
|
|
Re: Validation of multirecord block [message #234493 is a reply to message #234492] |
Tue, 01 May 2007 15:37 |
mgore
Messages: 4 Registered: April 2007
|
Junior Member |
|
|
Thanks littlefoot.
There is unique index on that table with all the three columns so dups are taken care off.
As I enter records on form I need to validate for overlapping dates. As and when record is entered on the form I am putting that in record group (array table). Facing issues as when record is cleared or deleted its gettign hard to keep track of that array record group. Also before saving if I change values in those columns my array is going out of sync.
[Updated on: Tue, 01 May 2007 15:49] Report message to a moderator
|
|
|
|
|
Re: Validation of multirecord block [message #234500 is a reply to message #234498] |
Tue, 01 May 2007 16:23 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Don't create it on-the-fly - create it using (any) SQL*Plus session (using CREATE GLOBAL TEMPORARY TABLE statement). It should remain created all the time; do not drop / recreate it. If you are used to temporary tables from another RDBMS's (MS SQL Server, perhaps?), Oracle's GTT's are NOT those you used to use there. If you are unfamiliar with GTT's, check the documentation.
Even if more than one user uses it, every one of them will see only its own data, so - don't worry about it.
|
|
|