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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CHANGING 2004323I400 TO 2004323D858

Status
Not open for further replies.

RANGO03

Programmer
Apr 24, 2003
9
US
I'm currently working in SQLTALK trying to do a global change to the last 4 digits of my activity table. For example, I'm needing to change 2004323I400 to 2004323D858.

update av_activity x set act = replace(act, '%I777', '%TEST') WHERE ACT LIKE '%I777'
AND EXISTS (SELECT MP FROM AV_MPMEMBERS Y WHERE Y.PROJ = X.PROJ AND Y.MP = 'NICK' );

This is what I currently have and it runs and tells me that it has updated records. But when I go to actually go into the tables and look at the records, nothing has changed. Can anyone help me???
 
I don't know SQLTALK, but if this is made in Access, you'll have to change the % sign to an * sign

Another option, if all the fields have the same lenght, you could do something like
Code:
 act = left(act,7) & "D858"
in your SQL
 
Thanks but I've tried to do it in Access and didn't have any luck. That's why I'm trying in SQLTalk.
 
Since I'm not having much luck on the sql and SQLTalk, can anyone help me with doign this in access?
 
Did you try my options? If so, tell me if they worked or where they failed to help you.

update av_activity x set act = left(act,7) & "D858" where whatever condition you need there
 
I finally got it to work in Access. I guess I was typing something wrong the other day when I tried it, but it's working today. Thanks alot ALEKSJAY!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top