Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Sort by non-base table items
You can do inserts/updates on a block with a view as the base table reasonably simply. Re-code the ON-INSERT and ON-UPDATE triggers to do explicit DML inserts/updates on the table you are trying to insert into. The *trick* is that you must re-code the ON-LOCK trigger for the block to take out a lock on base table rather than the view perhaps with a select for update. This will stop you from getting the forms message about not being able to update a view. This is how we do it in SQL*Forms 3, should be ok for 4, don't know of a better way in 4 ? Glenn gpearce_at_continuum.co.nz Continuum (NZ) Ltd. Auckland, New Zealand ______________________________ Reply Separator _________________________________Subject: Sort by non-base table items
Hello ALL !
I want to know if somebody has done sorting on non-base table items in Forms 4.5.
I have a master detail form where detail block is to be sorted on non-base table item (different Foreign Key).
We cannot use views as we are inserting/updating to the base table. I tried to use ',table2' in Block property sheet of Detail block. I also wrote the required ORDER BY clause for the detail block. It did work well with another form. But because of naming standards, (the generated SQL statement by Forms during executing query ), query could not be completed due to column ambiguously defined.
Base table of Block property sheet of Detail block : DET_BLOCK,FOREIGN_TABLE
ORDER BY clause of Block property sheet of Detail : ORDER BY FOREIGN_TABLE.FOREIGN_COLUMN1 But unfortunately, some columns in DET_BLOCK have the same name as columns in FOREIGN_TABLE ! NOTE : I AM NOT SURE IF THIS IS SUPPORTED ! Does anyone have an elegant way of doing the above ?
Thank you in Advance,
Tam.
Ta.Murari_at_Kellogg.com Received on Wed Feb 28 1996 - 19:58:49 CST
![]() |
![]() |