Solved

SQL Update Querry

Posted on 2013-01-14
5
190 Views
Last Modified: 2013-01-16
Can someone please tell me what update command I need in order to do this? I will need to do a mass change to all records with the following operation ID "1AC_"
Where Description is "RECIEVING" changed to read "RECEIVING / PRELIMINARY INSPECTION"
There are probably over 3 thousands records so I was wondering if someone could please tell me a querry to update the description on the table for specific records (operation ID "1AC_" )

Here is the table:
table
0
Comment
Question by:pauledwardian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 39

Assisted Solution

by:Pratima Pharande
Pratima Pharande earned 333 total points
ID: 38777116
Update tablename

set description='RECEIVING / PRELIMINARY INSPECTION'
where Operation_Id='1AC_'
and description = 'RECIEVING'

try this
let us know if any problem
0
 

Author Comment

by:pauledwardian
ID: 38778508
Thank you for your responce.
The Operation_Id always starts with "1AC_" but it has other characters attached to it like:

1AC_692545-17/-18
1AC_3886225
1AC_319545
 ...

And also the description is either like "RECEIVING:" (with collon) and in some cases "RECEIVING" (without the collon).

Can you please help?

Thank you,
Paul
0
 
LVL 32

Accepted Solution

by:
awking00 earned 167 total points
ID: 38778595
Update tablename

set description='RECEIVING / PRELIMINARY INSPECTION'
where Operation_Id like '1AC_%'
and description like 'RECEIVING%'
0
 
LVL 39

Assisted Solution

by:Pratima Pharande
Pratima Pharande earned 333 total points
ID: 38782225
Update tablename

set description='RECEIVING / PRELIMINARY INSPECTION'
where Operation_Id like '1AC_%'
and ( description = 'RECIEVING' OR description = 'RECIEVING:' )
0
 

Author Closing Comment

by:pauledwardian
ID: 38784593
Thank you all
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
connection to SQL 2012 error in windows 10 18 49
Access 2003, find all instances of database ODBC 3 55
SQL - Subquery in WHERE section 4 34
sql server query 9 28
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

710 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