Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update problem

Status
Not open for further replies.

nollieflip

Programmer
Joined
Aug 22, 2003
Messages
5
Location
US
I need to update a column that I did not originally populate on the first pass of my DTS script.

In my DTS I needed to combine our accountid's and account locations into one string. The problem now is how to write a update statement and the source data has the id's and locations still seperated...

Here is what I have, SQL tells mell "Invalid column name '0000'" (I needed to pad the right side of our account strings with 4 0's)

UPDATE BuildAccount
SET EmailAddress1 = (SELECT EmailStandards.EmailStandard
FROM EmailStandards WHERE BuildAccount.AccountNumber = EmailStandards.Account & right("0000" & EmailStandards.Location,4))
 
Replacing your ampersands with plus signs should work.
 
Need to change the " to ' also.

Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top