Here are some rules regarding when an updateable view can or cannot be created.
This Definition came from ORACLE but should be applicable to RBase.
Updatable Views Note: Updateable views can not include:
* Set Operators (INTERSECT, MINUS, UNION, UNION ALL)
* DISTINCT
* Group Aggregate Functions (AVG, COUNT, MAX, MIN, SUM, etc.)
* GROUP BY Clause
* ORDER BY Clause
* CONNECT BY Clause
* START WITH Clause
* Collection Expression In A Select List
* Subquery In A Select List
* Join Query
If pseudocolumns are present they can not be included in an update statement.
Jim Bentley
American Celiac Society
[email protected]
tel: 1-504-737-3293
________________________________
From: David Blocker <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Mon, December 7, 2009 11:20:38 AM
Subject: [RBASE-L] - Re: I/O PROBLEMS WITH SIMPLE VIEWS
Jim
It all looks in order. However, can you check what the temp views look like at
the R> prompt once created and send the definitions to the list? Perhaps we can
spot something there.
"David Blocker
[email protected]
Office: 781-344-1920
Cell: 339-206-0261"
-----Original Message-----
From: Jim Belisle [mailto:[email protected]]
Sent: Monday, December 7, 2009 10:41 AM
To: 'RBASE-L Mailing List'
Subject: [RBASE-L] - Re: I/O PROBLEMS WITH SIMPLE VIEWS
Here is the code for UPDATING one view
form the other view:
The views are created and I can manually
edit data with no problem.
CREATE TEMP VIEW View_OrdHead (Control#,
ShipDate, FreightPro) +
AS SELECT Control#, Shipdate,
FreightPro +
FROM OrderHeader WHERE Control# IN
(&vControlList)
CREATE TEMP VIEW View_BOLHead (Control#,
ShipDate, FreightPro) +
AS SELECT Control#, Shipdate,
FreightPro +
FROM BOLHeader WHERE Control# IN
(&vControlList)
-- Update OrderHeader, OrderShip &
BOLHeader w/ Shipdates, FreightPros then delete nulls.
UPDATE View_OrdHead SET FreightPro =
T2.FreightPro FROM +
View_OrdHead T1, View_BOLHead T2
WHERE T1.ShipDate = T2.ShipDate AND +
T1.Control# = T2.Control#
This is where I get the I/O problem.
Jim
________________________________
From:[email protected]
[mailto:[email protected]] On Behalf Of [email protected]
Sent: Saturday, December 05, 2009
9:28 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: I/O
PROBLEMS WITH SIMPLE VIEWS
If a single-table view has an "order by", that
also makes it not editable.
I agree with others -- something in your view makes it not-editable.
Maybe post your view syntax.
Karen
Jim,
Just because a view is a single table view does not automatically make it
updateable. If for example it contains a GROUP BY statement then it is NOT
updateable. There are other syntax elements that might make a single table view
un-updateable.