SQL WHERE Statement

Hi Guys,

I'm trying to get back into SQL and stuck in a pretty easy statement.

My Database holds these Fields

PlayerName, PlayingHole, Hole1 ... to ... Hole18, Group


The Admin will enter a score for the group at its specific hole when it is given to him. At the moment
I'm listing the Hole ok - but when I add the WHERE statement to list which Group I get stuck...

Current Statement:

'SELECT * FROM tblScoreCard Hole1 WHERE Group = 2 SORT'


I know this Statement is probably incorrect, however this one works but obviously no sorting of
the Group.

'SELECT * FROM tblScoreCard Hole1'

This gives me all data from the field Hole1 in the Table. Which is fine, but I only want it from the
individual Groups...


Many Thanks.
dantegroupAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
GROUP is a reserved keyword. also, "2 SORT" is a string...

in access:
SELECT * FROM tblScoreCard Hole1 WHERE [Group] = "2 SORT"

in vba/query:
SELECT * FROM tblScoreCard Hole1 WHERE [Group] = '2 SORT'


0
 
dantegroupAuthor Commented:
Thanks. Yes I remember that now....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.