Search the web
Sign In
New User? Sign Up
baseball-databank · Baseball Databank
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
database and openoffice   Message List  
Reply | Forward Message #3748 of 3880 |

Is anyone using openoffice with the Lahman database?

I am having issues when I try to make a query with the 2B and 3B data, getting errors that I do not understand...

an example

select *
from batting
where 3B like 23

gives the following error

SQL Status: HY000
Error code: 1000

syntax error, unexpected $end, expecting BETWEEN or IN or SQL_TOKEN_LIKE



what am I missing?

thanks

mike



Sun May 3, 2009 5:10 pm

hslewekim
Offline Offline
Send Email Send Email

Forward
Message #3748 of 3880 |
Expand Messages Author Sort by Date

Is anyone using openoffice with the Lahman database? I am having issues when I try to make a query with the 2B and 3B data, getting errors that I do not...
moose
hslewekim
Offline Send Email
May 3, 2009
5:11 pm

Did you try where 3b =23 or where 3b>23?...
Matthew Gargano
tkestars
Offline Send Email
May 4, 2009
1:18 am

Sorry or end it with ; ?...
Matthew Gargano
tkestars
Offline Send Email
May 4, 2009
1:18 am

The problem is likely that the query doesn't like a field name beginning with a number. I'm not certain what the syntax with OpenOffice is, but try something...
Bryan Walko
bryanwalko
Offline Send Email
May 4, 2009
1:19 am

I did just find some help documentation. It appears that a double-quote is what you want to use. Vive la difference... select * from batting where "3B" like...
Bryan Walko
bryanwalko
Offline Send Email
May 4, 2009
1:20 am

I would guess 3B is an integer column and LIKE s/b used with CHAR columns. Use =23 or >=23 is my untested suggestion Clem ... From: moose To:...
Clem Comly
ccomly2003
Offline Send Email
May 4, 2009
1:20 am

Most programming languages and DB don't like column/field names that start with digits. Instead of 2B, 3B, rename them to B2, B3. Alternatively, if you give...
Tangotiger
tom@...
Send Email
May 4, 2009
10:42 am

Why not using >,<,=,>=,<=,<> instead of 'like' operator? Like operator is normally used for strings values. Ex. Select * from batting 3B > 23 .. Also you...
Alberto Perdomo
albertop69
Offline Send Email
Sep 17, 2009
9:12 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help