Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL Update Querry

Posted on 2013-01-14
5
Medium Priority
?
200 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 1332 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 668 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 1332 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

670 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