- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Update query
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2009 10:27 AM
тАО09-29-2009 10:27 AM
Update query
I would like to have this statement execute after new defects have been entered. Please help.
My SQL statement is:
UPDATE REGULATORY_UPDATE.BUG
SET BG_REPRODUCIBLE = ' ', BG_DETECTED_BY= ' '
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2009 02:25 AM
тАО09-30-2009 02:25 AM
Re: Update query
sounds like you need a trigger on this table.
see associated documentation
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7004.htm#SQLRF01405
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_triggers.htm#ADFNS012
In essence you can blank these fields as rows are inserted into the "REGULATORY_UPDATE" table.
Regards
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2009 03:57 AM
тАО09-30-2009 03:57 AM
Re: Update query
Create a trigger like this:
CREATE OR REPLACE TRIGGER BUG_BI
before insert on REGULATORY_UPDATE.BUG
referencing new as new
old as old
for each row
begin
:new.BG_REPRODUCIBLE = null;
:new.BG_DETECTED_BY = null;
end;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2009 08:37 AM
тАО09-30-2009 08:37 AM
Re: Update query
before insert ON REGULATORY_UPDATE.BUG
WHEN new as null
old as Not Null
for each row
begin
:new.BG_REPRODUCIBLE = null;
:new.BG_DETECTED_BY = null;
end;
/
When I enter this into the HP Quality Center workflow - Script editor engine it highlights the first line and gives me a message of [Error] (L492: c8): Syntax error
All I am trying to do here and I am sure guys that it is my fault but I am not getting. I appreciate your patience...
I have a table called BUGS in this table there are two fields called BG_DETECTED_BY and BG_REPRODUCIBLE that get auto populated. I wish to make these two fields blank or null after it is updated. How can I do this. Most of the code in this Workflow - Script Editor seems to be VBScript.
Please help... Again thank you for your patience..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2009 01:52 AM
тАО10-02-2009 01:52 AM
Re: Update query
there are errors in the syntax.
use the show error command to indicate the line and error.
SQL> show error
Errors for TRIGGER BUG_BI:
LINE/COL ERROR
-------- -----------------------------------------------------------------
2/13 PLS-00103: Encountered the symbol "=" when expecting one of the
following:
:= . ( @ % ; indicator
the trigger should look like this :
CREATE OR REPLACE TRIGGER BUG_BI
before insert on XXXX.BGTEST
referencing new as new
old as old
for each row
begin
:new.BG_REG := null;
:new.BG_REASON := null;
end;
/
Note := instead of equal sign.
Regards
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2009 02:13 AM
тАО10-02-2009 02:13 AM
Re: Update query
Please don't mind this ITRC site is for HP server related issue.
Suraj