How about using a temp table with 2 columns for the ZIP code - a Before
and After:
PROJECT TEMPORARY ZIPTable from tmpdealerlocator using DealerID,zipcode
Add a NewZIP text column to ZIPTable.
UPDATE ZIPTable set NewZIP = ((SGET(zipcode,3,1)) & (SGET(zipcode,3,4)))
UPDATE tmpdealerlocator SET ZIPCODE = (NewZIP) +
From tmpdealerlocator T1, ZIPTable T2 +
WHERE T1.DealerID = T2.DealerID
You might need an index on ZIPTable.DealerID if it's slow.
Doug
Dan Goldberg wrote:
I have data that I receive from a vendor for canadian zipcodes and need to
put a space after the first three characters.
V0R1R1
Need to be
V0R 1R1
So I run the command:
UPDATE tmpdealerlocator SET zipcode = +
((SGET(zipcode,3,1)) + ' ' + (SGET(zipcode,3,4))) +
WHERE zipcode IS NOT NULL
It runs buts takes forever to put the spaces in it.
Does anyone have a suggestion to make it run faster??
TIA
Dan Goldberg