You can build a view using a where clause. <br>
<br>
For instance, two locations using the same employee table. Site_ID field contains the location name. <br>
View would be <br>
Select * from employee where site_id = user;<br>
<br>
Or even--<br>
Select * from equipment where site_id in (select site_id from employee where emp_code = user);<br>
<br>
Here is the syntax for creating a view in 8.x<br>
<br>
DROP VIEW MYDB.VTASK;<br>
CREATE OR REPLACE VIEW MYDB.VTASK <br>
(<br>
TASK_ID,<br>
DESCRIPTION,<br>
SITE_ID<br>
)<br>
AS<br>
select "TASK_ID","DESCRIPTION","SITE_ID" from TASK<br>
where site_id = user;<br>
<br>
After you create the view then define a synonym for that view for the user and give the user privileges.<br>
<br>
<br>
CREATE SYNONYM USERNAME.TASK<br>
FOR MYDB.VTASK;<br>
<br>
You've got the general idea by now.