Re: help with select for update

From: Thomas Olszewicki <ThomasO_at_cpas.com>
Date: Wed, 14 Jan 2009 10:56:44 -0800 (PST)
Message-ID: <41b1b2b0-af30-4c1f-a1d3-30cd2e7e0486_at_u13g2000yqg.googlegroups.com>



On Jan 14, 11:47 am, emdproduct..._at_hotmail.com wrote:
> Dear group,
>
> I am trying to debug a problem with FGAC, i enable the policy on a
> table
> When i do
> SQL>select count(*) from tableA where col=1;
>   COUNT(*)
> ----------
>          1
>
> I can get the row without problem
>
> But when i do
> SQL>select count(*) from tableA where col=1 for update nowait;
> no rows selected
>
> I do not see any errors, and i can not get the lock neither.
>
> What could be wrong?
>
> Thanks for your help

I don't have any policies in FGAC activated, but : In Oracle 10g and 11g:
SELECT COUNT(*) FROM <table> WHERE <condition> FOR UPDATE NOWAIT; raises an error:
"ORA-01786: FOR UPDATE of this query expression is not allowed"

You cannot select "count(*)" for update. It looks like FGAC hides this error with incorrect message "no rows selected".

HTH
Thomas Received on Wed Jan 14 2009 - 12:56:44 CST

Original text of this message