SQL = "SELECT * FROM tbldes WHERE Category LIKE '%" & Replace(Trim(Text1.Text), "'", "''") & "%' ORDER BY category"
rs.Open SQL, cn, 2, 3

use of this sign(%)
anybody can explain me, what is the use of this code?


br

Recommended Answers

Assuming your database is hosted on a MS SQL Server, the % sign is used as a wildcard character in the "LIKE" clause. So if you have
select * from myTable where name like '%smi%'
You would get "Joe Smith", "Jasmine Jones" "Smiling Dave" and so on.

Jump to Post

All 2 Replies

Assuming your database is hosted on a MS SQL Server, the % sign is used as a wildcard character in the "LIKE" clause. So if you have
select * from myTable where name like '%smi%'
You would get "Joe Smith", "Jasmine Jones" "Smiling Dave" and so on.

Assuming your database is hosted on a MS SQL Server, the % sign is used as a wildcard character in the "LIKE" clause. So if you have
select * from myTable where name like '%smi%'
You would get "Joe Smith", "Jasmine Jones" "Smiling Dave" and so on.

Thank you very much sir. It very will explain.....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.