I am using VB 6 with ADO to query a MS SQL database. I need to return all the records which match my criteria. I can explain it in words but not in code.
Verbally, here is what I am trying to do with a field called ItemNo.
I am given ItemNo = 415.
The table contains 415, ?15, ??5, 4?6, 4?9, ??9
In the table the ? represnts a wild card. Any character appearing in the same location is considered a match.
So from my table 415, ?15, ??5 all would match my given ItemNo, 415. Can a SQL statement be written to return the recordset I am looking for?
Note: The real ItemNo I am looking for is much longer and there are tens of thousands of records to search.
Any help would be appreciated.
Thanks,
pat
Verbally, here is what I am trying to do with a field called ItemNo.
I am given ItemNo = 415.
The table contains 415, ?15, ??5, 4?6, 4?9, ??9
In the table the ? represnts a wild card. Any character appearing in the same location is considered a match.
So from my table 415, ?15, ??5 all would match my given ItemNo, 415. Can a SQL statement be written to return the recordset I am looking for?
Note: The real ItemNo I am looking for is much longer and there are tens of thousands of records to search.
Any help would be appreciated.
Thanks,
pat