How to write contain query for msaccess database
My table have column value ' CHOPE PARMA TERA 101'
my search keyword in PARMA.
How can I write contain query to retrieve the record ?
How to write contain query for msaccess database
My table have column value ' CHOPE PARMA TERA 101'
my search keyword in PARMA.
How can I write contain query to retrieve the record ?
Query in MS Access:
select * from SomeTable Where SomeColumn Like '* PARMA *'
For standard SQL, it would be like '% PARMA %'
Note that the above statement would not find 'PARMA', 'CHOPE PARMA', or CHOPE PARMAHAM 101', or
any value with that contains PARMA; to do so just remove the spaces in the search string, e.g. '*PARMA*'
select * from SomeTable Where SomeColumn Like '*PARMA*'
ALike
instead of Like
?: SELECT * FROM groups WHERE Orgin Alike '%PARMA%'
–
Above Are you asking about using the Like condition?
If so, there's more info here
MS Access: LIKE Condition (using wildcards) in Access 2003/XP/2000/97
The LIKE condition allows you to use wildcards in the where clause of an SQL statement in in Access 2003/XP/2000/97. This allows you to perform pattern matching. The LIKE condition can be used in any valid SQL statement - select, insert, update, or delete.
The patterns that you can choose from are:
* allows you to match any string of any length (including zero length)
? allows you to match on a single character
# allows you to match on a single numeric digit
For Example
Like 'b*' would return all values that start with b
Like '*b*' would return all values that contain b
Like '*b' would return all values that end with b
Like 'b?' would return all values that start with b and are 2 characters in length
Like 'b#' would return all values that start with b and are 2 characters in length
where the second character is a number
© 2022 - 2024 — McMap. All rights reserved.