Solved

SQL Update Querry

Posted on 2013-01-14
5
184 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
  • 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

860 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