[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SQL WHERE Statement

Posted on 2007-08-08
2
Medium Priority
?
194 Views
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.
0
Comment
Question by:dantegroup
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 200 total points
ID: 19652439
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
 

Author Comment

by:dantegroup
ID: 19652715
Thanks. Yes I remember that now....
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

825 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