Hi Folks,
I'm sure this question has been asked before but the search function is down at the moment. I want to read data from a field in the database and replace the contents with something else depending on the content.
My query would be something like:
SELECT Replace(myTable.Buyer, 'A.N. Other', 'Joe Bloggs') as myBuyer ORDER BY Replace(myTable.Buyer, 'A.N. Other', 'Joe Bloggs')
The reason why I can't do:
SELECT IIF(myTable.Buyer = 'A.N. Other', 'Joe Bloggs', myTable.Buyer) as myBuyer
is that the 'A.N. Other' is only part of the field content - there is other text after it.
The Replace function doesn't appear to work. Is there any other way that I can do this??
Mighty
I'm sure this question has been asked before but the search function is down at the moment. I want to read data from a field in the database and replace the contents with something else depending on the content.
My query would be something like:
SELECT Replace(myTable.Buyer, 'A.N. Other', 'Joe Bloggs') as myBuyer ORDER BY Replace(myTable.Buyer, 'A.N. Other', 'Joe Bloggs')
The reason why I can't do:
SELECT IIF(myTable.Buyer = 'A.N. Other', 'Joe Bloggs', myTable.Buyer) as myBuyer
is that the 'A.N. Other' is only part of the field content - there is other text after it.
The Replace function doesn't appear to work. Is there any other way that I can do this??
Mighty