Home » Developer & Programmer » Forms » Joining Problem
Joining Problem [message #119877] Mon, 16 May 2005 09:19 Go to next message
anisd2k
Messages: 12
Registered: May 2005
Location: Karachi
Junior Member


I am joing two blocks. i.e one is based on Emp table Other on SalGrade Table

In form I want to create master detail relation b/w these blocks.

the join codnition is
emp.sal>= salgrade.losal AND emp.sal>= salgrade.hisal

but gives me error. invalid joining condition.

My question is that
"Is it not possible in form to create non equi joins?"

Can any one explain why.

Thanks in advance

Anis



Re: Joining Problem [message #119890 is a reply to message #119877] Mon, 16 May 2005 10:13 Go to previous message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

Hi,
The relation between emp table and salgrade table is not a Master/Detail relation.
You didn't specify what functionality you want to achieve from these two tables in the form.
Here's one thing that came to my mind. Yu probably want to query the employees by grades from the salgrade table.

Create a view for emp and salgrade table and base your datablock on that view.
SQL> CREATE OR REPLACE VIEW sal_comp AS
  2  SELECT e.ename, e.sal, s.grade
  3  FROM emp e, salgrade s
  4  WHERE e.sal >= s.losal AND e.sal <= hisal;

View created.

SQL> SELECT * FROM sal_comp
  2  WHERE grade = 1;

ENAME            SAL     GRADE
---------- --------- ---------
SMITH            800         1
ADAMS           1100         1
JAMES            950         1


Now base your datablock on this view. Create a tabular form. Records Displayed = 8
Open the property pallete of grade. Change Number of Items Displayed to 1.
Make sure grade is the first field appearing in your data block.

Run the form and you can query the employees by grades.

Do you require other functionality?

Describe briefly what else you want to do with emp and salgrade table.

Thanks and regards.

Previous Topic: how to create list
Next Topic: form builder and oracle lite ...
Goto Forum:
  


Current Time: Thu Sep 19 18:53:43 CDT 2024