Execute Ms.Access SQL in UiPath

Hi all, I am having some issue in asking UiPath to execute Ms Access SQL with wildcard.

The SQL is not executed when there is wildcard in the condition (SQL shown in Ms.Access):

INSERT INTO Table2… FROM Table1…
WHERE (((Field1)=Criteria1) AND ((Table1.[Field2]) Like “AB*”));

The SQL means to filter anything start with “AB” in Filed2 of Table 1 and append into Table2.

However, UiPath seems like could not recognize “AB*” and nothing is appended…

Try INSERT INTO Table2… FROM Table1…
WHERE (((Field1)=Criteria1) AND ((Table1.[Field2]) Like “AB”)); OR
INSERT INTO Table2… FROM Table1…
WHERE (((Field1)=Criteria1) AND ((Table1.[Field2]) Like “AB”)
);

Thanks Jose for your prompt response!

However, I can’t use OR in this case as the wildcard represent number and it could be more than 2 arrangement, i.e.
AB1234
AB2345
etc.

Are you suggesting to have for AB*?
WHERE (((Field1)=Criteria1) AND ((Table1.[Field2]) Like [AB*]))

I wasn’t saying to use OR. I was saying to test one or the other.

Try what I sent you in the image.

Hi Jose, yea, currently our code is following “AB*”. However, the SQL did not work. Nothing is appended.

Hello.

Try ’ instead of "

Thank you everyone, it has been solved :smile: