Not able to retrive the data form view. [message #319694] |
Mon, 12 May 2008 13:06 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sreenu80
Messages: 50 Registered: July 2006 Location: bangalore
|
Member |
![srinivas_ch_05%40yahoo.co.in](/forum/theme/orafaq/images/yahoo.png)
|
|
Hi friends
when i trying to retive data form view it is showing no records retrived.But when i trying to query the script which is defined for View it is picking the data.
Ex:
select * from v1;
No rows retriveds
Script for the v1 view
create view v1(A1,B1,C1)as select a1,b1,c1 from v2;
when i am querry the script of v1 alone :
select a1,b1,c1 from v2; It is retriving data.
But if i quered like select * from v1;
No data retrived.
Please help me on this it is very urgent.
Thanks
sreenu
|
|
|
|
Re: Not able to retrive the data form view. [message #321519 is a reply to message #319694] |
Tue, 20 May 2008 10:20 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
Steve Corey
Messages: 336 Registered: February 2005 Location: RI
|
Senior Member |
|
|
You have to set the organizational context to retrieve data from views in a SQL session. This is because the organization application parameter is not automatically set, like it is when you login to the application. There are a number of system parameters that behave in this manner, such as last_login_id, but to retrieve rows from views, you only need to set the org context.
BEGIN
fnd_client_info.set_org_context(:org_value);
end;
:org_value is the ID number of your top organization in your system hierarchy. If you are not using multi-org, then there can really only be one valid value for this parameter. The set_org_context function accepts numbers only, so you may have to cast the bind variable appropriately or replace with the literal value in NUMBER format.
|
|
|