Geeks With Blogs
Geeks with Blogs, the #1 blog community for IT Pros
Start Your Blog
Login
Paula DiTallo
94 Posts
| 66 Comments
My Most Popular Posts
SQL Server: I need to get to a remote server and management studio is broken. How can I login without ssms?
1524 views
Visio 2010: How do I change the Title when in Borders & Titles?
1026 views
SSIS: I get the error The column data for column "Column x" overflowed the disk I/O buffer
835 views
SQL Server: Is there a query I can use that generates similar output to Activity Monitor?
481 views
SQL Server 2012: How do I set "Edit top" rows to a different number?
467 views
My Other Recent Posts
How do I remove a named instance of sql server 2008 on the same mssql server?
How do I create and access another sql server db using linked server in SQL Server?
How do I know what version of Ubuntu I am running?
How do I get a listing of all DB instances and table names where a column name occurs in MS SQL Server?
How do I get access to DB2 from my .NET applications?
Why Won't the Relationship Lines in Visio 2010 Connect to Anything?
SQL Server: UPDATE Statement Basics
SQL Server: How Can I search for a specific text value in all the stored procedures?
How do I restore a SQL Server database from a backup *.bak file?
Why does Eclipse say Another Transaction is Already in Progress when I Deploy my Google Application?
News
Copyright © 2008-2013 Paula DiTallo
Post Categories
Enterpise Architecture
BPM/BRE
Practical Answers
Artificial Intelligence
BizTalk
BlackBerry Storm
SQL
Linux
.NET
Malware, Viruses, SpyWare
Google Apps
DB2
visio 2010
ERD Diagram
Java
Eclipse
ssis
Archives
March 2013 (8)
November 2011 (3)
October 2011 (3)
September 2011 (2)
August 2011 (2)
July 2011 (2)
June 2011 (5)
May 2011 (3)
February 2011 (2)
November 2010 (1)
October 2010 (3)
September 2010 (2)
August 2010 (1)
May 2010 (2)
November 2009 (2)
August 2009 (2)
June 2009 (2)
May 2009 (4)
March 2009 (5)
January 2009 (4)
December 2008 (5)
November 2008 (3)
September 2008 (4)
August 2008 (2)
July 2008 (2)
June 2008 (1)
May 2008 (4)
April 2008 (1)
March 2008 (5)
February 2008 (2)
January 2008 (7)
Ask Paula!
...bringing you notes from the field...
<< Where is my Host file on Windows?
|
Home
|
A 'Get it Done Now!' Approach for transforming SQL Server Data to XML Data >>
SQL Update Statement - using SubSelect
Comments (1)
|
Share
This is a simple, but helpful example of changing a boolean or bit flag in a table to
'True'
when the condition in the subSelect is met. In this context, the SQL statement finds all the cases where a sales agent's email exists in the
Metro_SalesForce
table
and
exists in the related table
Metro_SalesForceMult
. The
Metro_SalesForceMult
table contains the USA state assignments
only
for sales agents representing
more than
a single state.
UPDATE Metro_SalesForce
SET multipleStates = 'True'
WHERE Metro_SalesForce.email in
(
Select x.email
From Metro_SalesForce x, Metro_SalesForceMult y
Where x.email = y.email
)
Posted on Friday, May 29, 2009 10:34 AM
SQL
|
Back to top
Related Posts on Geeks With Blogs
Matching Categories
SQL Server: I need to get to a remote server and ...
SQL
SQL Server: Is there a query I can use that genera...
SQL
SQL Server Agent:: I Can't Edit a Job Step because...
SQL
SSIS: I get the error The column data for column "...
SQL
SQL Server 2012: How do I set "Edit top" rows to a...
SQL
Comments on this post: SQL Update Statement - using SubSelect
No comments posted yet.
Your comment:
Title:
Name:
Email: (never displayed)
(will show your
gravatar
)
Comment:
Allowed tags: blockquote, a, strong, em, p, u, strike, super, sub, code
Enter the code shown above
Copyright © Paula DiTallo | Powered by:
GeeksWithBlogs.net
|
Join free
Popular Posts on Geeks with Blogs
0
RavenDB GetAll extension method
Announcement: Employee Info Starter Kit (v6.0–ASP.NET MVC Edition) is Released
How to Design Bullet list (ul >li ) in Html ,css ?
Using decimals in Ordered Lists
Preparing For BUILD 2013
Geeks With Blogs Content Categories
ASP.Net
SQL Server
Apple
Google
SharePoint
Windows
Visual Studio
Team Foundation Server
Agile
Office
Design Patterns
Web
Azure
Brand New Posts on Geeks with Blogs
0
Read the Comments!
BizTalk 360 Alarms, How do you configure yours?
Is It Time To Specialize?
JQGrdi PDF Export
Stright Talk Nokia Lumia 920 MMS Fix