SQL with parameter and wildcard lazarus / 16-Databases ---------------------------------------------------------------------- tinytim33 · 2015-02-19 22:07 HI, I know this is a lazarus forum, but I'm using Delphi and i hope the same solution applies here. I simply want to run an SQL statement that takes a letter(s) entered into a textbox and returns results where names of books have the same first letter(s). E.g. if the user enters H into the textbox edtBookTitle, then books such as 'Happy Days','Heaven', 'Hoping for Tomorrow' would be returned. Here is what I have used, but i get no results. The textbox into which the letter is entered is edtBookTitle.text. Hope this makes sense. Code: [Select] qbook.SQL.Text:='SELECT BookID,BookTitle FROM Book WHERE BookTitle LIKE CONCAT("edtBookTitle.text","%")'; I get no results when i run the query. ---------------------------------------------------------------------- tinytim33 · 2015-02-19 22:18 Just figured it out. I need to learn my apostrophes better! Code: [Select]qbook.SQL.Text:='SELECT BookID,BookTitle FROM Book WHERE BookTitle LIKE CONCAT("'+edtBookTitle.text+'%")';  qbook.open;