Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restricting field options to View lookup

Status
Not open for further replies.

filipe26

Programmer
Mar 17, 2003
152
PT
Hi im using pl/sql and i want to restrict a field on (create table or a trigger) with a lookup view.Thanks
 
Filipe,

If you are able to use triggers, then yes, it is very straightforward to limit value choices to contents of a VIEW. I can propose trigger code for you if you post:

1) the name of the trigger table.

2) the column names from the VIEW that:
a) match to columns from the trigger table.
b) contain the valid values.

3) the maximum number of valid values from the VIEW.



[santa]Mufasa
(aka Dave of Sandy, Utah, USA)

Do you use Oracle and live or work in Utah, USA?
Then click here to join Utah Oracle Users Group on Tek-Tips.
 
create trigger tri_bi_compras_desc
BEFORE INSERT
ON compras-desc
FOR EACH ROW

BEGIN
.....
.....
END;

Notes:
the field name is descricao and the view(that as just a column with the values) is called produtos_animais
Maximum number of valid values is for example 10.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top