troubleshooting Question

Oracle Forms question

Avatar of anumoses
anumosesFlag for United States of America asked on
* forms6i,Oracle Database
3 Comments1 Solution88 ViewsLast Modified:
Oracle forms question

I have 2 blocks ( master, detail- look like but not exactly)

Both blocks are form same table. Table is PROFILES

1st block (profile_type = 'CONFIGATR')

2nd block (profile_type =  CONFIGVAL')

1st block queries fine as where clause in the block is profile_type = 'CONFIGATR'

2nd block that acts like detail has to query where profile_type = 'CONFIGVAL' and profile = 'AD' ( as block has various profiles)  

Help is needed as I have to do this programatically - building a where clause
If user clicks on AD of the first block 3 records for AD has to be displayed. EO -1 record has to be displayed.

CREATE TABLE DSS.TAB1
(
  PROFILE_TYPE  VARCHAR2(10 BYTE)               NOT NULL,
  PROFILE       VARCHAR2(12 BYTE)               NOT NULL,
  DESCRIPTION   VARCHAR2(60 BYTE),
  ACTIVE        VARCHAR2(1 BYTE)                NOT NULL
)


SET DEFINE OFF;
Insert into DSS.TAB1
   (PROFILE_TYPE, PROFILE, DESCRIPTION, ACTIVE)
 Values
   ('CONFIGATR', 'AD', ' Config Attr AD', 'Y');
Insert into DSS.TAB1
   (PROFILE_TYPE, PROFILE, DESCRIPTION, ACTIVE)
 Values
   ('CONFIGATR', 'EO', ' Config Attr EO', 'Y');
Insert into DSS.TAB1
   (PROFILE_TYPE, PROFILE, DESCRIPTION, ACTIVE)
 Values
   ('CONFIGATR', 'MOD', ' Config Attr MOD', 'Y');
Insert into DSS.TAB1
   (PROFILE_TYPE, PROFILE, DESCRIPTION, ACTIVE)
 Values
   ('CONFIGATR', 'REV', ' Config Attr REV', 'Y');
Insert into DSS.TAB1
   (PROFILE_TYPE, PROFILE, DESCRIPTION, ACTIVE)
 Values
   ('CONFIGATR', 'SB', ' Config Attr SB', 'Y');
Insert into DSS.TAB1
   (PROFILE_TYPE, PROFILE, DESCRIPTION, ACTIVE)
 Values
   ('CONFIGATR', 'SIL', ' Config Attr SIL', 'Y');
COMMIT;

CREATE TABLE DSS.TAB2
(
  PROFILE_TYPE       VARCHAR2(10 BYTE)          NOT NULL,
  PROFILE            VARCHAR2(12 BYTE)          NOT NULL,
  DESCRIPTION        VARCHAR2(60 BYTE),
  ACTIVE             VARCHAR2(1 BYTE)           NOT NULL,
  PROFILE_ATTRIBUTE  VARCHAR2(60 BYTE)
)


SET DEFINE OFF;
Insert into DSS.TAB2
   (PROFILE_TYPE, PROFILE, DESCRIPTION, ACTIVE, PROFILE_ATTRIBUTE)
 Values
   ('CONFIGVAL', '100', 'Config Val M for AD', 'Y', 'AD');
Insert into DSS.TAB2
   (PROFILE_TYPE, PROFILE, DESCRIPTION, ACTIVE, PROFILE_ATTRIBUTE)
 Values
   ('CONFIGVAL', '101', 'Config Val M for AD', 'Y', 'AD');
Insert into DSS.TAB2
   (PROFILE_TYPE, PROFILE, DESCRIPTION, ACTIVE, PROFILE_ATTRIBUTE)
 Values
   ('CONFIGVAL', '102', 'Config Val M for AD', 'Y', 'AD');
Insert into DSS.TAB2
   (PROFILE_TYPE, PROFILE, DESCRIPTION, ACTIVE, PROFILE_ATTRIBUTE)
 Values
   ('CONFIGVAL', '200', 'Config Val O for EO', 'Y', 'EO');
COMMIT;
ASKER CERTIFIED SOLUTION
anumoses

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros