Home » Developer & Programmer » Forms » comparision problem........
comparision problem........ [message #228368] Mon, 02 April 2007 13:05 Go to next message
rajat_chaudhary
Messages: 141
Registered: November 2006
Location: india
Senior Member

hi everyone,
suppose that there are two tables master and the second one is detail......
now suppose in master table data is like ...........
-- MASTER BLOCK
CODE NAME SEX
1 RAJAT MALE
2 RAHUL MALE
3 UTKARSH MALE

--- DETAIL BLOCK.
CODE NAME FEATURE
1 RAJAT BLACK EYE
1 RAJAT BLACK HAIR
1 RAJAT LONG LEGS
2 RAHUL WEARING SPECS
2 RAHUL TALL
3 UTKARSH CURLY HAIR


NOW WHEN I ENTER THE DATA IN THE MASTER BLOCK THROUGH A FORM IN WHICH I HAVE THE FIELDS OF CODE ,NAME, SEX AND FEATURES.....
AFTER ENTRING THE FEATURE OF ANY CODE AND NAME......
IF ALL THE FEATURE IS EXACTLY MATCHED WITH ANY ONE OF EXISTED USERS THEN THERE SHOULD BE AN ALERT WHICH SHOWS THAT THE USER HAVING SAME FEATURES EXIST........


FOR AN EXAMPLE................
SUPPOSE CODE = 4 ,NAME = 'MARTIN' AND

FEATURES

WEARING SPECS
TALL

WHICH ARE EXACTLY MATCHED WITH THE FEATURES OS RAHUL.......
SO AN ALERT SHOULD BE DISPLAYED THAT THE USER WITH THE SAME FEATURE EXIST........
AND

IF THE NAME IS SAME THEN ALSO THE PROCESS SHOULD BE DISPLAYED....
CHECKING SHOULD BE MADE ON "FEATURES",INSPITE ON "NAME OR CODE"

I HAD A PROBLEM IN COMPARING ENTERED FEATURES WITH THE EXISTED FEATURES.......

(WHICH HAS TO BE DONE ONE BY ONE COMPARISION).

IF POSSIBLE THEN PLEASE ATTACH A SOLVED MODULE ALSO.
THANKS IN ADVANCE............................


RAJAT CHAUDHARY
Re: comparision problem........ [message #228418 is a reply to message #228368] Tue, 03 April 2007 00:03 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
The simplest is to 'commit' the data to the database as each new entry is entered and then use the 'select' statement in a When-Validate-Item to see if it already exists in the database.

David
Re: comparision problem........ [message #228674 is a reply to message #228418] Tue, 03 April 2007 11:35 Go to previous messageGo to next message
rajat_chaudhary
Messages: 141
Registered: November 2006
Location: india
Senior Member

yes david,
you arewrite to write a when-validate-trigger....
but i want to check all the data related to that code will be
compared with the entered data (which are more than one row)...
so might be cursor has to be applied.....
but by using cursor code is not working in that condition
so try to give me code........

THANKS .................
RAJAT
Re: comparision problem........ [message #228717 is a reply to message #228674] Tue, 03 April 2007 21:07 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I stated that the easiest method is to 'commit' the data after EVERY row. By my definition, you would NOT need to 'loop' as the previous data will already be in the database.

The other choice is to use 'record groups'. I recommend STRONGLY that you do the validation each time (item or row) is entered and NOT wait until the screen is full as your code will stop at the first error and this may confuse your users.

Look at these entries:
LOV validation/Combo Box Problem
http://www.orafaq.com/forum/m/141361/67467/?srch=create+record+group+unique#msg_141361

Unique key during data entry
http://www.orafaq.com/forum/m/201107/67467/?srch=create+record+group#msg_201107
also
http://www.orafaq.com/forum/m/147107/67467/?srch=validate+master+detail+record+group#msg_147107

David
Previous Topic: Auto connect the data base
Next Topic: Calling jar file from Forms 6.0
Goto Forum:
  


Current Time: Fri Dec 09 04:19:46 CST 2016

Total time taken to generate the page: 0.16158 seconds