SQL WHERE Statement

Posted on 2007-08-08
Last Modified: 2010-03-20
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.
Question by:dantegroup
    LVL 142

    Accepted Solution

    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'


    Author Comment

    Thanks. Yes I remember that now....

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    In database programming, custom sort order seems to be necessary quite often, at least in my experience and time here at EE. Within the realm of custom sorting is the sorting of numbers and text independently (i.e., treating the numbers as number…
    PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now