Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


SQL*Plus - Update field in a table using a variable

Posted on 2009-02-18
Medium Priority
Last Modified: 2013-12-07

Database Name: ess_test
Tablename: data_to_ess
Field that needs updated: status
Field that holds variable:  contract
Variable Name:  convar

Need a sample stored procedure or SQL*Plus command that would do the following:

Find all records where 'convar' equals 'C43' and 'status' equals 'Move_To_Planning'.  For all those records change the value in the 'status' field from 'Move_To_Planning' to 'Completed'.  Do nothing 'contract' field.  Can use sample login username and password for this example.

Is this enough information?


Question by:elwayisgod
1 Comment
LVL 32

Accepted Solution

Daniel Wilson earned 200 total points
ID: 23675565
Just an UPDATE statement?  how's this?

Update data_to_ess Set Status =  'Completed'
Where Status = 'Move_To_Planning'
     And convar = 'C43';

Open in new window


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question