how to get it........ [message #227837] |
Thu, 29 March 2007 13:07 |
rajat_chaudhary
Messages: 141 Registered: November 2006 Location: india
|
Senior Member |
|
|
hi everyone,
suppose there are two tables say
employees(employee_id,hire_date,salary,department_id) and departments(department_id,department_name)
actually i want to retrieve the data of """ employee_id,hire_date,salary,department_name,department_id """ on the basis salary .....
in forms6i ,i have a text item of salary and the moment when i click a button or to execute the query ,data will be retrieved on the basis of salary ,,, the related data would be shown in the text/display items..........
ex---
suppose ther are 3 employees getting salary 5,000 so when i enter the salary 5000 and execute/press a button , the information of that employee_ids,corresopnding department_id from where they are belonging ,....... and all the data in the presented fields ( as metioned columns) will be displayed..
please send an attached module of this solution.....
thanks very much in advance.......
|
|
|
Re: how to get it........ [message #227843 is a reply to message #227837] |
Thu, 29 March 2007 13:29 |
orausern
Messages: 826 Registered: December 2005
|
Senior Member |
|
|
I don't do forms, but isn't your question, actually about a join of two tables, and an extra clause in where condition like
and salary= x (where x is the value you pass from the front end)
something like:
select
employee_id,hire_date,salary,department_name,department_id
from
employee, departments
where
employee.department_id=department.department_id
and employee.salary=:x
so basically join the two tables on the matching keys and then add an extra clause in the where clause as above and attach this query to the when button pressed or whatever the action is and check...
just my 2 cents.
|
|
|
|
|