# Miscellaneous > SQL Scripts >  SQL string not pulling all access records

## littleduk

Hi Guys,
Im trying to retrieve a recordset from mt database using some sql..
Im managing to get some records but not all are getting retrieved.

Its supposed to be an alphabetic search and the user enters a letter of the alphabet and the database should return every record thats name starts with the letter..

Here is the sql string im using but its not quite right as i say t doesnt bring back all the records only some and wondered if anyone could advise.



```
MySQL="SELECT * FROM table1 where field_name Like '" & strname & "%' ORDER BY field_name ASC"
```

----------


## littleduk

Hi thanks for reading if you did, this is fixed now, the sql was fine it was something else that caused the bug..Thanks again. :-)

----------

