Hi all,
I am having an issue when trying to create a view based on 3 tables. The database is Oracle10g
the SQL looks like the following:
[SQL]
CREATE VIEW MARKETREPORTVIEW AS SELECT * FROM
(
SELECT * FROM
(
SELECT ROS.RID AS TREPORTID ,
ROS.BID AS TBID ,
ROS.SGROUPID AS TGROUPID ,
ROS.SGROUPNAME AS TSGROUPNAME ,
ROS.SDR AS TSDR ,
ROP.UDA1TITLE AS TUDA1TITLE ,
ROP.UDA1VAL AS TUDA1VAL ,
FROM ROP INNER JOIN ROS ON ROP.POOLID =
ROS.SGROUPID
AND
ROP.RTID = ROS.RTID
) AS TESTTABLE
)
TESTTABLE INNER JOIN AFRPT ON ARFRPT.CID = TESTTABLE.TBID AND ARPT.REPORTID = TESTTABLE.TREPORTID ;
[/SQL]
The error that I get is 'ORA-00907: missing right parenthesis' at the ') AS TESTTABLE'.
I also tried the following for the FROM clauses...
[SQL]
//...
FROM ROP, ROS WHERE ROP.POOLID = ROS.SGROUPID (+) AND ROP.REPORTID = ROS.REPORTID (+)
) AS TESTTABLE
)TESTTABLE, AFRPT WHERE AFRPT.CID = TESTTABLE.TBID (+) AND AFRPT.REPORTID = TESTTABLE.TREPORTID (+) ;
[/SQL]
From what I can tell, the SQL should be correct. Could anyone provide any clues as to why the syntax validator is not liking it?
Thanks
2 3595
Hi all,
I am having an issue when trying to create a view based on 3 tables. The database is Oracle10g
the SQL looks like the following:
[SQL]
CREATE VIEW MARKETREPORTVIEW AS SELECT * FROM
(
SELECT * FROM
(
SELECT ROS.RID AS TREPORTID ,
ROS.BID AS TBID ,
ROS.SGROUPID AS TGROUPID ,
ROS.SGROUPNAME AS TSGROUPNAME ,
ROS.SDR AS TSDR ,
ROP.UDA1TITLE AS TUDA1TITLE ,
ROP.UDA1VAL AS TUDA1VAL ,
FROM ROP INNER JOIN ROS ON ROP.POOLID =
ROS.SGROUPID
AND
ROP.RTID = ROS.RTID
) AS TESTTABLE
)
TESTTABLE INNER JOIN AFRPT ON ARFRPT.CID = TESTTABLE.TBID AND ARPT.REPORTID = TESTTABLE.TREPORTID ;
[/SQL]
The error that I get is 'ORA-00907: missing right parenthesis' at the ') AS TESTTABLE'.
I also tried the following for the FROM clauses...
[SQL]
//...
FROM ROP, ROS WHERE ROP.POOLID = ROS.SGROUPID (+) AND ROP.REPORTID = ROS.REPORTID (+)
) AS TESTTABLE
)TESTTABLE, AFRPT WHERE AFRPT.CID = TESTTABLE.TBID (+) AND AFRPT.REPORTID = TESTTABLE.TREPORTID (+) ;
[/SQL]
From what I can tell, the SQL should be correct. Could anyone provide any clues as to why the syntax validator is not liking it?
Thanks
HI , Here i am giving an example .You need to correct your syntax.When you are creating a view on some tables , you need to be define the attributes on view level.
CREATE OR REPLACE VIEW soda_beverage_dependent (
manufacturer_id,
name,
notes )
AS
select s.manufacturer_id, s.name, b.notes from
soda_manufacturer s, beverage_class b
where s.notes = b.notes
/
cheers
SN
HI , Here i am giving an example .You need to correct your syntax.When you are creating a view on some tables , you need to be define the attributes on view level.
CREATE OR REPLACE VIEW soda_beverage_dependent (
manufacturer_id,
name,
notes )
AS
select s.manufacturer_id, s.name, b.notes from
soda_manufacturer s, beverage_class b
where s.notes = b.notes
/
cheers
SN
Thanks SN, I see where I was wrong.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Fritz Bosch |
last post by:
We are in the process of refactoring our GUI-based test application
for radio equipment and are rewriting a significant part in Python.
The new architecture will substantially be based on the...
|
by: Michael Krzepkowski |
last post by:
All,
I have a view that returns the following values:
Item Vendor
70807 1234
70807 5678
If I am looking for items that have more...
|
by: Zack Sessions |
last post by:
Has anyone tried to create a SQL7 view using the CREATE VIEW command
and ADO.NET? If so, is there a trick in trapping a SQL error when
trying to create the view? I have a VB.NET app that, amoung...
|
by: Sim Zacks |
last post by:
I just did a dump and restore of my database and one of my views did
not recreate.
The error received was :
pg_restore.exe: could not execute query: ERROR: column reference "pricinggroupid" is...
|
by: Beowulf |
last post by:
I have the view below and if I use vwRouteReference as the rowsource
for a combo box in an MS Access form or run "SELECT * FROM
vwRouteReference" in SQL Query Analyzer, the rows don't come through...
|
by: petermichaux |
last post by:
Hi,
I have been using the following line of code to create an object called
"Serious" if it doesn't already exist.
if (Serious == null) {var Serious = {};}
This works in the scripts I use...
|
by: Hurricane |
last post by:
When I create a view in SQL and include an ORDER BY clause i can see it
in Management Studio. However, when I call the same view from an ASP
page the order goes completely haywire.
Any ideas?
|
by: dav3 |
last post by:
Any help here is appreciated folks.
First in my Person class the comments = errors visual basics is giving me and I am not sure why. Also when i try and set up my array of pointers to Student...
|
by: jonceramic |
last post by:
Hi All,
I started developing in Access, and people took notice and so we're
starting to migrate into our corporate's bigger Oracle system.
I'll still be using my developed Access front ends,...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |