linkerschuh
02-09-2015, 12:44 PM
Hi all,
I have a table with miscellaneous fields. One field is called "Registered Countries". Other fields are country names like "Switzerland", "Germany", "France", etc.
I try to come up with a codeline which updates the "country name" field with "0" if in the "registered country" field a pre-determined letter combination is found.
So as an example, in the field "Registered countries" there is the letter combination "CH, DE, SE, IE, GB, LU". The codeline is now supposed to recognize that there is the letter combo "DE" in the field and therefore put in the country name field "Germany" a "0".
What I have gotten so far is this:
strSQL = "UPDATE tblexample SET tblexample.[Germany] = ""0"" WHERE tblexample.[Registered Country] = ' *DE* '"
curdatabase.execute strSql, dbFailOnError
The problem is the "where-expression" is not right and I donīt manage to fix it. How is it possible to express that "DE" might be everywhere in the "Registered Country" field?
Thanks a lot for help!
I have a table with miscellaneous fields. One field is called "Registered Countries". Other fields are country names like "Switzerland", "Germany", "France", etc.
I try to come up with a codeline which updates the "country name" field with "0" if in the "registered country" field a pre-determined letter combination is found.
So as an example, in the field "Registered countries" there is the letter combination "CH, DE, SE, IE, GB, LU". The codeline is now supposed to recognize that there is the letter combo "DE" in the field and therefore put in the country name field "Germany" a "0".
What I have gotten so far is this:
strSQL = "UPDATE tblexample SET tblexample.[Germany] = ""0"" WHERE tblexample.[Registered Country] = ' *DE* '"
curdatabase.execute strSql, dbFailOnError
The problem is the "where-expression" is not right and I donīt manage to fix it. How is it possible to express that "DE" might be everywhere in the "Registered Country" field?
Thanks a lot for help!