Home » SQL & PL/SQL » SQL & PL/SQL » Materialized view with userenv('lang')
Materialized view with userenv('lang') [message #196068] Wed, 04 October 2006 00:45 Go to next message
crmoffat
Messages: 33
Registered: November 2005
Location: Australia
Member
Hi all

i have a view like this

create or replace view xx_simple_query
as
select * from
table
where table.lang = userenv('lang')

when I run this through TOAD or SQL Developer, logging in as APPS, it returns no data, which is what I would expect as userenv('lang') is set to 'GB', where table.lang always = 'US'.

Now I create a materialized view, again logged in as APPS through SQL Developer, that draws it's data from

select * from xx_simple_query

it populates data. So when the materalized view is created, userenv('lang') must be 'US'. Any suggestions why the MV would act differently to the normal query?

cheers

Cameron

Re: Materialized view with userenv('lang') [message #196087 is a reply to message #196068] Wed, 04 October 2006 01:50 Go to previous message
crmoffat
Messages: 33
Registered: November 2005
Location: Australia
Member
resolved, SQL developer / TOAD run it with the current userenv('lang'), just a mix up after somebody had altered the language.

cheers

cameron
Previous Topic: Decode statement
Next Topic: How to set OFF the option "Display Substitution Variables"
Goto Forum:
  


Current Time: Tue Dec 06 04:48:05 CST 2016

Total time taken to generate the page: 0.13729 seconds