True about updates through a view
hi frds
i just need the right answer for the choices mentioned below with explanation
plz help me
What is true about updates through a view?
A. You cannot update a view with group functions.
B. When you update a view group functions are automatically computed.
C. When you update a view only the constraints on the underlying table will be in effect.
D. When you update a view the constraints on the views always override the constraints on the underlying tables.
And a very tricky only it is.
Peter, you are correct that view constraints are not enforced in the sense of PKs and FKS, but there are two other view constraints that are enforced.
SQL> CREATE TABLE t AS
2 SELECT rownum id, object_name
3 FROM all_objects
4 WHERE rownum < 11;
Table created.
SQL> CREATE VIEW t_read AS
2 SELECT * FROM t
3 WITH READ ONLY;
View created.
SQL> CREATE VIEW t_check AS
2 SELECT * FROM t
3 WHERE mod(id,2) = 0
4 WITH CHECK OPTION;
View created.
SQL> CREATE VIEW t_nocheck AS
2 SELECT * FROM t
3 WHERE MOD(id, 2) = 0;
View created.
SQL> INSERT INTO t_read VALUES (100, 'READ ONLY');
INSERT INTO t_read VALUES (100, 'READ ONLY')
ERROR at line 1:
ORA-01733: virtual column not allowed here
SQL> INSERT INTO t_check VALUES (100, 'EVEN ID');
1 row created.
SQL> INSERT INTO t_check VALUES (101, 'ODD ID');
INSERT INTO t_check VALUES (101, 'ODD ID')
ERROR at line 1:
ORA-01402: view WITH CHECK OPTION where-clause violation
SQL> INSERT INTO t_nocheck VALUES(100, 'EVEN ID');
1 row created.
SQL> INSERT INTO t_nocheck VALUES(101, 'ODD ID');
1 row created.
SQL> UPDATE t_check SET id = 201
2 WHERE id = 2;
UPDATE t_check SET id = 201
ERROR at line 1:
ORA-01402: view WITH CHECK OPTION where-clause violation
SQL> UPDATE t_nocheck SET id = 201
2 WHERE id = 2;
1 row updated.The WITH READ ONLY constraint bars all changes to the view. The WITH CHECK OPTION stops any changes that would make the record invisible to the view. It is essentially a CHECK constraint on the view.
John
Similar Messages
-
hi have just purchased iphone 4s . my itunes on my mac is currently 10.4 . 10.5 is needed for the new iphone but when i download it and click on install the itunes about still says 10.4 . have tried to update through itunes but it says there is no software available for me . please help . mr frustrated
If your computer is running an OS X prior to Snow Leopard 10.6,
the answer (if it is an Intel-based Mac; not old PowerPC model)
would be to buy the retail Snow Leopard 10.6 DVD from Apple
for about $20, and install it. Then update that to 10.6.8 by using
the installed Snow Leopard online to get Combo Update v1.1 for
Snow Leopard 10.6.8. After that is installed & updated, run the
system's Software Update again, to see what else is available to
that system.
Later systems can then be looked into at Mac App Store, once
the computer is running Snow Leopard 10.6.8.
And if your computer is a Power PC (G4/G5, etc) and has no
Core2Duo kind of CPU -- See "About this Mac" in apple menu
to disclose the general info about your Mac. Also you can see
even more by clicking on "More Info" when looking in there...
If it isn't an Intel-based Mac, it can't run a system past 10.5.8.
Hopefully this helps.
Good luck & happy computing! -
Updating a Base Table through a View having UNPIVOT function.
Hi,
I have a requirement of updating a Base Table through a View.
This View has the query using a UNPIVOT function for displaying the columns of the Base tables in rows.
I need to update/insert into/delete the Base Table by accessing the View (The user doesn't have an access to the Base Table, hence the DML's on the View).
Following is the table I've created:-
CREATE TABLE PERSON_DETAILS
PID VARCHAR2(10 BYTE),
FIRSTNAME VARCHAR2(1000 BYTE),
LASTNAME VARCHAR2(1000 BYTE),
PHONENUMBER VARCHAR2(1000 BYTE),
ADDRESS1 VARCHAR2(1000 BYTE),
ADDRESS2 VARCHAR2(1000 BYTE),
COUNTRY_CODE VARCHAR2(1000 BYTE),
LANGUAGE_CODE VARCHAR2(1000 BYTE),
EMAIL VARCHAR2(1000 BYTE)
)The sample values are inserted in this table through the below script:-
insert into person_details values ('1','XYZ','ABC','1234567890','India','Asia','IN','EN','[email protected]');
insert into person_details values ('2','XYZ2','ABC2','1234567890','India','Asia','IN','EN','[email protected]');The code for the view is as below:-
CREATE OR REPLACE FORCE VIEW PERSON_DETAILS_VIEW
PID,
CD_NAME,
CD_VALUE
AS
SELECT "PID", "CD_NAME", "CD_VALUE"
FROM person_details UNPIVOT INCLUDE NULLS (cd_value
FOR cd_name
IN (firstname AS 'First Name',
lastname AS 'Last Name',
phonenumber AS 'Phonenumber',
address1 AS 'address1',
address2 AS 'address2',
country_code AS 'Country Code',
language_code AS 'Language Code',
email AS 'Email') );Below are the values from the view:-
PID CD_NAME CD_VALUE
1 First Name XYZ
1 Last Name ABC
1 Phonenumber 1234567890
1 address1 India
1 address2 Asia
1 Country Code IN
1 Language Code EN
1 Email [email protected]
2 First Name XYZ2
2 Last Name ABC2
2 Phonenumber 1234567890
2 address1 India
2 address2 Asia
2 Country Code IN
2 Language Code EN
2 Email [email protected] user would fire some statement like below:-
update person_details_view
set cd_value = 'US' where CD_NAME = 'IN'The above statement should update the base table PERSON_DETAILS.
I understand I can write an INSTEAD OF trigger but I do not know what logic to write in the trigger so that the requirement gets fulfilled.
My Oracle Version
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for Solaris: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - ProductionAny help would be highly appreciated.
Thank You,
Ankit Khare.
Edited by: Ankit_Khare84 on Jun 28, 2012 2:47 PMit is definitively possible with an instead of trigger.
for Example:
create or replace
TRIGGER ioft_person
INSTEAD OF UPDATE
ON person_details_view
FOR EACH ROW
declare
firstname1 person_details.firstname%type;
BEGIN
SELECT firstname_new into firstname1
FROM (SELECT pid, cd_name, cd_value
FROM
select * from person_details_view where (pid, cd_name) not in (select :new.pid, :new.cd_name from dual)
union all
select :new.pid, :new.cd_name, :new.cd_value from dual
PIVOT ( max(cd_value) AS new FOR (cd_name) IN
('First Name' AS firstname,
'Last Name' as lastname,
'Phonenumber' as phonenumber,
'address1' as address1,
'address2' AS address2,
'Country Code' as country_code,
'Language Code' as language_code,
'Email' as email
) where pid = :old.pid;
UPDATE person_details
SET firstname = firstname1
WHERE pid = :old.pid;
END ioft_role_perm;and than run
update person_details_view
set cd_value = 'X|X' where cd_name = 'First Name' and pid=1The logic is: you must convert back the view through pivoting -
Problem regarding updation of Z-table through maintenance view
hi ,
I m facing problem in updation of Z-table through maintenance view (SM30).
The scenario is that I have one customizing field in my Z-table which is checkbox.
Now I need to populate 2 fields in Z-table on tick of this checkbox and clicking of SAVE button.
For this I have created one module ''change_field'' in PAI.
Actually my database table is being updated but as soon as the control left my module all the updation that take place vanishes away.....
So please help me in this matter.Thanks for ur previous effort it is updating the database but its effect is not shown immediately on screen.After i referesh the transaction it is dispalying the data.
So can u please suggest me any way....
Now i have one scenario infront of me....
I need to restrict the data shown in maintenance view.
I think it would be same as pop-up window displayed when we tick on 2nd radiobutton ("ENTER CONDITIONS")
of intial screen of t-code SM30.
Please suggest what shud i do....
Thanks and reagrds,
Amit
Edited by: amit gupta on Jul 18, 2008 1:35 PM -
Can't download the ipod touch update. It keeps timing out about halfway through. I don't have this problem downloading any other large files. Is this an issue with the ipod and/or software?
Hi there,
What gen device are you using?
Disconect your Firewall or any security programme that could be blocking this download.
If all else fails then totally uninstall iTunes and Apple mobile device support then reinstall it.
Hope this helps! -
How to check the way table S066 is updated through VKM3
Hello Experts!
I'm debbuging transaction VKM3. This is used to release open orders. Within this functionality infostructure S066 (credit managment for open orders) will be updated.
My problem is that I can't see the values it's using to update the table because it is being updated through a "commit work and wait" statement.
this is where the update takes place:
include MV45AF0B_BELEG_SICHERN
if call_function = space or us_syncron = charx.
if us_syncron = space.
commit work.
else.
commit work and wait. " This is getting executed
endif.
I've already activated the update mode debugging (so it's calling all the update functions registered through "call fucntion in update task"), but I think it's calling some system functions (not sure about it).
Is there a way to check how the update takes place?
thanks in advance for your help!Hi,
Yes there is another way where you view the values used to update S066.
As Rob said you can get the details through ST05.
Else after we do the UPDATE DEBUGGING ON and once a COMMIT WORK statement is encounted then the debugging session will open in another screen there goto menu path Breakpoints->Breakpoints at->Statement----"UPDATE"....
Similary for "INSERT" & for "MODIFY". This will stop at all the DB tables update where in if S066 is updated then definetly it will stop at S066 UPDATE.
Please try this once and let me know if any.
Regards,
Srinivas -
Force an immediate update on a View
Hi,
this is my second question today... have been stacking those for a while!
My application is an OpenGLES based one. The standard EAGLView (glView) is linked through Interface Builder.
In my applicationDidDinishLaunching, I add a few views inherited compontents to manage various GUI messages :
- one UILabel (class member) to display various messages
- One UIActivityIndicatorView (class member too) to show progression of some tasks
Basicely, here is the code that initiates my various components:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[glView setDelegate:self];
CGRect rect = [[UIScreen mainScreen] applicationFrame];
CGRect frame = CGRectMake(rect.origin.x + 10, rect.size.height - 20, rect.size.width - 20, 40);
labelMessage = [[UILabel alloc] initWithFrame:frame];
labelMessage.text = [NSString stringWithString:[[UIDevice currentDevice] model]];;
[labelMessage setTextColor:[UIColor whiteColor]];
labelMessage.backgroundColor = [UIColor darkGrayColor];
frame = CGRectMake(rect.origin.x + 140,rect.origin.y + 190, 40 , 40);
ProgressionWatch = [[UIActivityIndicatorView alloc] initWithFrame:frame];
// Add the controls to the window
[window addSubview:labelMessage];
[window addSubview:ProgressionWatch];
[window makeKeyAndVisible];
[ProgressionWatch startsAnimating];
[ProgressionWatch setHidden:NO];
[self SetupFeatures];
And the fact is my *LabelMessage does not update as long as my [SetupFeatures] is not over*... which means I cannot use my progression watch to indicate some progression linked to the "SetupFeatures" process.
So, I thought about a NSTimer that would do the SetupFeatures as soon as "ApplicationDidFinishLaunching" is over, that would occur after the views are updated (it works fine)... but that does not sound nice to me.
Furthermore, It's not the only place I have this problem, and I don't wanna throw a hundred timers.
I am sure there is a way to force the Update so that views can be updated while the content is being modified....
My question is hence *"do you know a way to force some view to update its content immediately"* ?
Thanks for reading till the end.Also thanks for this CFRunLoopRunInMode() tipp. I use it to also update my NavigationController with a UIActivityView.
Is this correct iPhone Cocoa or already "hacking" that could confuse my app runtime?
It seems to me that it directly frees the synchronous behavior and I can now redraw my UI.
Message was edited by: tax123 -
Performing multiple updates through a grid
I'm pretty green as far as Dynpro goes so please forgive me if this is an easy one.
Basically I have a table (grid) which allows a user to view and edit pricing information.
The data is retrieved and updated through .NET web services.
The pricing values are edited through an InputField contained in one of the columns of the grid. This InputField is, in turn, bound to a property in the response from the web service in my view context.
Lets say a user edits one price, hits the down arrow on the keyboard and edits another field and then hits Enter.
Somehow, I need to identify in my "OnEnter" event handler, exactly which rows were edited so I can then pass the pertainent data to the web service for processing.
I don't think I can use the typical "getLeadSelected" and "isMultiSelected" scenario that you would for deleting a row.
I really don't want to have to create a separate view for editing individual grid lines one at a time and relegate the grid to being a simple read only selection control.
Any suggestions?
-SheldonEnded up solving this one today. Wasn't too bad once I got a good handle on tranversing the Context and using the .isChangedByClient() property. (Like I said, I'm pretty new to Dynpro)
For completeness I am including my solution with this post. (sorry for the exceedingly long names)
public void onActionUpdatePricing(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionUpdatePricing(ServerEvent)
//Find out how many records we have
int n = wdContext.nodeRequest_EmployeeSalesServicesSoap_getAllProductPrices().nodeProductPrice_Response().nodeProductPrice_Result().size();
// create an instance of the update web service class
Request_EmployeeSalesServicesSoap_updatePrice reqUpdPrice = new Request_EmployeeSalesServicesSoap_updatePrice();
wdContext.nodeRequest_EmployeeSalesServicesSoap_updatePrice().bind(reqUpdPrice);
//temporary storage for a single element as we iterate through them
IWDNodeElement PriceElement;
for (int i = 0; i <= n - 1; i++)
//Get an element
PriceElement = wdContext.nodeRequest_EmployeeSalesServicesSoap_getAllProductPrices().nodeProductPrice_Response().nodeProductPrice_Result().getElementAt(i);
//Check to see if it has been modified
if (PriceElement.isChangedByClient())
//If it has been modified then call the update function in the component controller. This
// method will, in turn, call the web service class with the appropriate parameters
// TO DO: error checking for update failure.
wdThis.wdGetMainmenuController().UpdatePrice(Integer.parseInt(PriceElement.getAttributeAsText("priceID")),Float.parseFloat(PriceElement.getAttributeAsText("productSellingPrice")));
//After we are done updating, reset the Context changed bit for all items
wdContext.getContext().resetChangedByClient();
//@@end -
Is there a restriction on deleting data from an table through a view?
I have an Oracle Forms application where, try as I might, I cannot delete records based on a view. I know that the restriction may be because of Forms but, is there a database level restriction on deleting records through a view?
try as I might, I cannot delete records based on a view. Do you get an error?
There are several restrictions about deleting via a view:
http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_triggers.htm#sthref1191 -
Windows 8.1 Hybrid Boot and Software Updates through ConfigMgr
Hello,
I've never posted here before because I usually get all my answers from a search. But this issue I'm finding very little information about throughout the web.
In my organization we have ConfigMgr deploying monthly software updates, usually just Security Updates, to our Windows 8.1 estate. We have a standard 8.1 build on our machines, nothing too custom. We have left the Hybrid Boot feature left on.
However, when deploying software updates through ConfigMgr we're seeing reboot after reboot to complete. In some cases up to 5 restarts and so we have had to disable all reboots and reboot notifications. Disabling Hybrid Boot allows all updates
to install after just 1 restart. So from what I understand, a full shut down is required to apply software updates. Can anyone tell me whether Windows 8.1 should be aware of updates it is applying and switch to a full shut down when Hybrid Boot
is enabled?
I know this is very much a Windows 8.1 issue, however I'm interested to know whether other people deploying software updates via ConfigMgr have experienced this issue in their environments.
Thanks for any advice.Hi,
Please check the article below first. It indicates the restart process in Windows 8 continues to perform a full boot cycle, without the Hibernation performance improvement .
Quote:
What About Restart?
When you restart the computer, that typically means that you want a completely new Windows state, either because you have
installed a driver or replaced Windows elements that cannot be replaced without a full restart.
As a result, the restart process in Windows 8 continues to perform a full boot cycle, without the Hibernation performance improvement mentioned above.
Windows 8: Fast Boot
Best Regards,
Joyce
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] -
How to use FM VIEW_MAINTENANCE_NO_DIALOG for updating values in views
Hi all,
I got a scenario to update the maintainenace view V_T001S based on the user inputs through a program.
I'm thinking to use this FM VIEW_MAINTENANCE_NO_DIALOG , but im getting lot of errors.
Please let me know if you have any other solutions for this scenario.
Thanks in Advance.
Best regards,
Sekhar.
Resolved.. thanks
Edited by: Chandrasekhar Raju on Mar 29, 2011 6:55 AMHi,
you could use Dynamic SQL /Execute immediate to run DDL from a stored procedure.
http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/11_dynam.htm
Could you please tell why do you want to create a materialized view in stored procedure ?
How frequently you will runt this procedure . It would is better to create a MV once and use it.
thanks -
MVKE table updation through MM17 mass maintainence.
Hi Experts,
I need some input regarding mass maintenance of material.
The input field 'Product Hierarchy' is present in 'Basic data' (MARA-PRADHA) and in 'Sales View' (MVKE-PRODH).
As per standard SAP if I do changes through MM02 in Basic data, the field automatically updates in Sales View.
But if I propose changes in the field MARA-PRAHDA (i.e.product hierarchy) through MM17, it is only updating MARA-PRADHA and not in MVKE-PRODH.
Every user does not have the authorisation to use MM02, hence we are using MM17.
Is there any another method to update both the fields other than MM02.
Kindly suggest.
Warm Regards
TusharFriend
MARA and MVKE are two differnt feilds.
When you are using MM17 and maintaining values for feild in table MARA - PRADHA means you are limiting (Mass maintianing )to that table and feild only. Hence you will have to select MVKE - PRADHA as well while maintaing through MM17
Where as MM02 or MM01 with SAP Standard setting has a warning message to check Prod.hieracrchy in Sales view while maintining first in Basic view.
Reward if useful
Regards
SE -
Required function module to Update MM-classification view
Hi Floks,
i got one object on MM, some material having the classificaton view and some material dont have, but my requirement is i need to update the classification view, Do you know any idea about , what is the function module is required ?
Thanks
Siva Prasad
Sap-Practicethe trick, when looking for these bapis, is NOT to look with material master bapis, but under cross application->classification->objectclassification... (in tcode BAPI)
you will se the bapis you need.
one thing, when you look in transaction bapi, all bapis for classification are shown with a _KEY suffix. the ones you want are WITHOUT the _KEY suffix...
we use these all of the time. -
Hello Gurus,
I have a question about "update table" entries. I read somewhere that an entry in update table is done at the time of the OLTP transaction. Is this correct? If so, does this happen on a V1 update or V2 update? Please clarify. Similarly, an entry in the "extraction queue" (incase you are using "queued delta" will happen on V1 update. I just want to get a clarification on both these methods. Any help in this matter is highly appreciated.
Thanks,
SreekanthHi
update tables are temporary table that are refreshed by v3 job.update table is like buffer, it gets filled after updation of application table and statistical table through v1 v2 update . we can bypass this process by delta methods.
M Kalpana -
IDSM2 sig update through IDS MC 2.0
Hello,
forgive me if i will stress again about signatures update through VMS IDS version 2.0.
Since i installed it, i'm experiencing a well known problem related to the following error message:
Sensor ids-mo-dis-2: Signature Update Process
An error occurred while running the update script on the sensor named ids-mo-dis-2. Detail = An error occurred at the sensor during the update, sensor message = The host is not trusted. Add the host to the system's trusted TLS certificates.
Follwing the tips from previous post, i tried to switch between Common Services and CiscoWorks certificates; that trick worked for one sensor but not for the other one (it's a couple of IDSM2 4.1, with the very same configuration).
Any idea??
PaoloOne more clue about my issue.
I logged into sensor with service account, and I found that file /usr/cids/idsRoot/etc/tls.conf missed of the
following entry field:
[CA/foo.mynet.net]
certFile=foo.mynet.net.cer
foo.mynet.net is just the hostname of IDS MC console server. After i added it, the upgrade start to work properly. But after i issue the command:
/etc/init.d/cids restart
the file tls.conf still lacks of the previously added missing entry.
Maybe you are looking for
-
While attempting to download Creative Cloud, clicking Download in the Download Center (url: https://creative.adobe.com/products/creative-cloud) results in this message: Creative Cloud is a desktop app so you'll want to download it from you computer.
-
CUCM 8.6 WEBADMIN ERROR
Hi, I have a CUCM version 8.6. It was working fine for a couple of month and then suddenly one day there is the below error. Command Line Interface is starting up, please wait ... Welcome to the Platform Command Line Interface Exception in thread
-
How do you make photoshop be the default program to open image files from bridge?
I just installed CS5.5 and tried to open some pictures but it keeps opening in Windows live photo gallery. I don't even see opening in photoshop as an option when I right click and scroll down to "open with" (for jpeg images). I never had this issue
-
Hey all, I would like to know how can I read a template´s information to know if it is a pattern macthing or a geometric matching template? In my code, users provide templates and the algorithm must match them using pattern matching or geometric mat
-
Root.sh fails - asm won't shut down
I am trying to instal clusterware 11gR2 on Oracle Enterprise Linux 5. This is all running an Oracle Virtualbox environment, using ASM for the cluster disk in an openfiler. 32 bit installation, 1GB memory allocated to each node environment. I had to i