473,326 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Simple Select Problem

MySQL 4.0.13-nt

I have a table:
CREATE TABLE state_county (
StCo_key bigint(20) NOT NULL auto_increment,
State varchar(255) NOT NULL default '',
County varchar(255) NOT NULL default '',
Territory bigint(20) NOT NULL default '0',
Hits bigint(20) NOT NULL default '0',
PRIMARY KEY (StCo_key,State),
UNIQUE KEY StCo_key (StCo_key),
KEY State (State),
KEY StCo_key_2 (StCo_key)
) TYPE=MyISAM;

When I execute the any of these queries:
SELECT `StCo_key` , `State` , `County` , `Territory` , `Hits`
FROM `state_county`
WHERE `State` = 'Iowa'

SELECT *
FROM `state_county`
WHERE `State` = 'Iowa'

SELECT *
FROM `state_county`
WHERE `State` = "Iowa"

I get an empty set. If I execute:
SELECT *
FROM `state_county`
WHERE `StCo_key` = "1"

I get the result.

What do I need to do to get the `State` querey to work?

TIA,

Paul
Jul 19 '05 #1
0 1140

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: unixman | last post by:
As usual, it is 2:00am, and I'm pulling my hair out, finally resorting to posting in the newsgroups for help. :) Simple problem, in theory. Given table "map": CREATE TABLE map ( entry_id...
1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
2
by: Gerry | last post by:
I am relatively new to DB2 and having a problem with a simple union statement. Running Db2UDB version 8.1.1 on Aix 5.1 The union and union all SQL statements I am running produce the same...
3
by: John Baker | last post by:
Hi:7 Newby here to ASP, and using the ASP.NET Web Matrix development tool. While that tool looks great for a Newby, I have run into a snag. I have an HTML Text Box which I have named HireInput,...
5
by: Tim::.. | last post by:
Can someone tell me how I convert this simple SQL statement so I can use it in ASP.NET??? I have an issue with the quotation marks and wondered if there is a simple rule for converting the sql...
4
by: dba_222 | last post by:
Dear Experts, Ok, I hate to ask such a seemingly dumb question, but I've already spent far too much time on this. More that I would care to admit. In Sql server, how do I simply change a...
9
by: Emin | last post by:
Dear Experts, I have a fairly simple query in which adding a where clause slows things down by at least a factor of 100. The following is the slow version of the query ...
1
by: Ted | last post by:
In MS SQL I used the following to create a stored procedure. USE AdventureWorks; GO IF OBJECT_ID ( 'HumanResources.usp_My_Search', 'P' ) IS NOT NULL DROP PROCEDURE HumanResources.usp_My_Search;...
6
by: SuperFool | last post by:
This has got to be one of those questions only a serious newbie would come up with.... Basicly: I select all the city names in the table and turn them into a pull down menu (code below) print...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.