Home » Developer & Programmer » Forms » wanna compare ... how do i achieve it?
wanna compare ... how do i achieve it? [message #231359] Mon, 16 April 2007 13:18 Go to next message
rajat_chaudhary
Messages: 141
Registered: November 2006
Location: india
Senior Member

hi everyone,
suppose there are two tables a and b....
a table is form type and
b table is tabular type.
now there is a value in a on which basis i have 10 records(say) in table b.
now i want to check duplicity on the basis of data entered in tabular table ........
if the recently entered data is already existed then it shows an alert and stops further processing else go further....

suppose there is column of department number 10 in table a
and data related to department in a is also in table b



now there are three columns in table b(name,age,salary)
now as soon as any operator enter the data in text boxes which are already saved in database regarding the department number 10.
it should shows an alert that the data is already entered.
*** my opinion***
it means that the recently entered data is compared with saved data......

then it checks duplicity.....
now i am not understanding that where should i check duplicity(either after completed the entry or at the time o saving)(i prefer after completed the entry).......

now please give me solution as soon as possible......

REGARDS
RAJAT
Re: wanna compare ... how do i achieve it? [message #231440 is a reply to message #231359] Tue, 17 April 2007 02:05 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Hi,
before I get into this:
- "wanna" = "I want to"? I am fully that not everyone here can speak/write English as their first language. But put some effort into it, please. It is sloppy and holds me back from responding.
- tables != blocks.

Now, you have a classic master detail, if I'm not mistaken. Something like this:
A.COLUMN1         A.COLUMN2
A.COLUMN3         A.COLUMN4
-----------------------------
B.COLUMN1 B.COLUMN2 B.COLUMN3
B.COLUMN1 B.COLUMN2 B.COLUMN3
B.COLUMN1 B.COLUMN2 B.COLUMN3
B.COLUMN1 B.COLUMN2 B.COLUMN3
B.COLUMN1 B.COLUMN2 B.COLUMN3


You want to check for duplicity. If you have a UNIQUE index defined on the basetable of the B block, you can trap the DUPVAL_ON_INDEX error when the user is committing (saving) the data. If you want it to be done on record level, you can check against the original table or you could populate a PL/SQL table on each change of the master record and check your new record against that table. If you have a primary key defined, you can also try the 'enforce primary key' block property.

MHE
Re: wanna compare ... how do i achieve it? [message #231882 is a reply to message #231440] Wed, 18 April 2007 13:28 Go to previous message
rajat_chaudhary
Messages: 141
Registered: November 2006
Location: india
Senior Member

thanx maheer for ur reply,
but actually i am not getting what u want to say.
if possible then please send a module created on this problem.....
REGARDS
RAJAT
Previous Topic: ORA-304500
Next Topic: HELP: Create an LOV in which a few of the values cannot be selected(read only)
Goto Forum:
  


Current Time: Thu Sep 26 22:55:54 CDT 2024