This is working for selecting all records with the *, but not for when you have a Where clause limiting your output. I've tried some functions I found online, but no success yet. It's someone else's db and the SQL is way too hairy - your generic format is better here. Thanks a lot for this input. If you know how to get 1, 2, 3, 4, etc. when there's a Where clause, that would be great.