General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Select, Update & partial string replacement
Hi,
I have a Paradox sales.db file accessed via ODBC where I need to change all the first 4 characters of the sales.idnum which is a PK field. I would rather use SQL as in the past this has proved faster than loading a remote view, doing a string replacement and updating the view.
The scenario is as below...
Original sales.idnum
S0991231
S0991232
S0991233
S0991234
Need to be changed to...
A0011231
A0011232
A0011233
A0011234
I guess what I am looking for is an SQL equivelant to...
UPDATE ALL sales.idnum WITH 'A001'+SUBSTR(sales.idnum,5,4)
Regards
Doug Johnston
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only