I have this SQL statement which is working fine, but it doesn’t satisfy my needs. It is retrieving all the data from the table which should exactly be the same. I mean the First name in the table should be exactly the textbox’s text. This is the SQL statement I am using.
SELECT
CustomerID, FirstName, LastName, Email, Mobile
FROM
Customers
WHERE
(FirstName = @FirstName)
What I need is something related to LIKE condition I guess, which it works like this: there is data in the table “Sample Text” and I write down in the textbox Samp, Sam, Sa, and any text which is the same to the data in the table the data will automatically display. btw I am using Micosoft Visual Studio to help me to build my query using query builder.
Thanks in advance.
Well, at least in regards to the query, this is what you need:
You will be sending the temporary first name from your text box to the SQL server and display the results for selection.