Home » Developer & Programmer » Reports & Discoverer » different views (oracle 10g)
different views [message #300523] Fri, 15 February 2008 14:43 Go to next message
aarti81
Messages: 235
Registered: December 2007
Location: USA
Senior Member
Hi

I'm generating a report from a view and i'm getting 22 records, where as another person is generating the same report from another view and he is getting 19 records.My question is even though the views are different we are still accessing the same underlying tables, pls can any one tell why we are getting diff number of records?


Thanks
Re: different views [message #300529 is a reply to message #300523] Fri, 15 February 2008 15:06 Go to previous message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Because views are different. So what if underlying tables are the same?

Here's an example, based on 'emp' table of Scott's schema. I'll create two views (as in your case), and - as you've put it - underlying table is the same:
SQL> create view v1_emp as
  2  select ename, job, sal
  3  from emp
  4  where deptno = 10;

View created.

SQL> create view v2_emp as
  2  select ename, job, sal
  3  from emp
  4  where deptno = 20;

View created.

SQL> select count(*) from v1_emp;

  COUNT(*)
----------
         3

SQL> select count(*) from v2_emp;

  COUNT(*)
----------
         5

SQL>

Did you get familiar with a "view"? Do you know what it is? If not, /forum/fa/1681/0/ and search for "view". If you still have a question after reading the documentation, come back and ask. Someone will surely try to help.
Previous Topic: REP-0177 error while running in remote server
Next Topic: how to build hierarchy report
Goto Forum:
  


Current Time: Tue Jul 02 08:59:34 CDT 2024