Simple SQL (1 Viewer)

Tieval

Still Clueless
Local time
Today, 04:38
Joined
Jun 26, 2015
Messages
475
I have a simple piece of SQL which changes something when something else starts with PQ:

Code:
DoCmd.RunSQL "UPDATE LogFile SET LogFile.Field3 = Replace([LogFile]![Field3],""AGB"",""4GB"") " & vbCrLf & _
"WHERE (((LogFile.Field3) Like ""AGB*"") AND ((LogFile.Field8) Like ""PQ*""));"

I want to change this to do it when it contains PQ (AAPQBB or AAABBPQ or PQAABB etc.), I am sure the answer is pretty obvious but have spent a whole day trying different possibilities.

Any help would be greatly appreciated.
 

Tieval

Still Clueless
Local time
Today, 04:38
Joined
Jun 26, 2015
Messages
475
Many thanks for that, it was the first thing I tried yesterday and I had tried every possible variation thereafter on the assumption that it didn't work.

Somebody confirming that it was correct made me look a bit further and I found it was being removed later in the code for a different reason.

Trouble is, when you are not sure something is working you get a bit of tunnel vision.
 

Users who are viewing this thread

Top Bottom