Advertisement

05.07.2008 at 01:58PM PDT, ID: 23384277
[x]
Attachment Details

A simple SQL UPDATE with join

Asked by mbroad02 in SQL Server 2008, MS SQL Server, MS SQL DTS

Tags: MICROSOFT, SQL SERVER, 8.00

I am a newbie with SQL, so bear with me.  I need to create a SQL statement that will do the following.  Read a customers file (a) and update the file when zip5 and zip 4 of customers file (a) matches zip5 and zip4 (both) of ZIPCODE file (b).

When the match is found, the customer jurisdiction field (a) is updated with the contents of the ZIPCODE file jurisdiction field. (from b)

What is a simple SQl statement that will accomplish this (probably using a join and update)?

thanks a lot!
MarkStart Free Trial
 
 
[+][-]05.07.2008 at 02:03PM PDT, ID: 21520341

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Server 2008, MS SQL Server, MS SQL DTS
Tags: MICROSOFT, SQL SERVER, 8.00
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.08.2008 at 07:02AM PDT, ID: 21524753

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628