469,111 Members | 1,944 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,111 developers. It's quick & easy.

Sql Problem


I'm selecting fields from History table (Oelsls) including Description from
Inventory table (Invt) where Cust_# = value of PBV_lngCustomerNumber.
However I get an error: 'Unkown Table Oelsls'!! When it's there! Anything
wrong with what I'm doing?

"Select Oelsls.Part_ID, Invt.Desc1, Oelsls.Last_Sale, Oelsls.Order_#,
Oelsls.Ltd_Units, Oelsls.Ltd_Sales From Oelsls, Invt Where Oelsls.Part_ID =
Invt.Part_ID" & " And Oelsls.Cust_# = " & PBV_lngCustomerNumber

Jul 20 '05 #1
6 1328
Joel wrote:
I'm selecting fields from History table (Oelsls) including Description from
Inventory table (Invt) where Cust_# = value of PBV_lngCustomerNumber.
However I get an error: 'Unkown Table Oelsls'!! When it's there! Anything
wrong with what I'm doing?


Just a guess... Table names for MyISAM tables are case-sensitive in
MySQL. You must match the spelling of the table name exactly.

This might not be true on Windows, though. The reason is that MyISAM
tables correspond directly to files on the filesystem, and UNIX/Linux
filenames are case-sensitive, while on Windows they are not.

Regards,
Bill K.
Jul 20 '05 #2
Thank you for responding Bill. If I run the Sql statemeny like this:

"Select Part_ID, Last_Sale, `Order_#`, Ltd_Units, Ltd_Sales From Oelsls
Where `Cust_#` = " & PBV_lngCustomerNumber

It works!
"Bill Karwin" <bi**@karwin.com> wrote in message
news:cn*********@enews3.newsguy.com...
Joel wrote:
I'm selecting fields from History table (Oelsls) including Description from Inventory table (Invt) where Cust_# = value of PBV_lngCustomerNumber.
However I get an error: 'Unkown Table Oelsls'!! When it's there! Anything wrong with what I'm doing?


Just a guess... Table names for MyISAM tables are case-sensitive in
MySQL. You must match the spelling of the table name exactly.

This might not be true on Windows, though. The reason is that MyISAM
tables correspond directly to files on the filesystem, and UNIX/Linux
filenames are case-sensitive, while on Windows they are not.

Regards,
Bill K.

Jul 20 '05 #3
Joel wrote:
Thank you for responding Bill. If I run the Sql statemeny like this:

"Select Part_ID, Last_Sale, `Order_#`, Ltd_Units, Ltd_Sales From Oelsls
Where `Cust_#` = " & PBV_lngCustomerNumber

It works!


Okay, maybe failing to put Order_# in backticks was confusing to MySQL,
and it blamed it on the _next_ token it saw, which was Oelsls.Ltd_Units.

Have you tried your original query using the backticks every time
Order_# is mentioned? Be sure to quote your table names and field names
that contain special characters.

Regards,
Bill K.
Jul 20 '05 #4
Here's what I did:

"Select Oelsls.Part_ID, Invt.Desc1, Oelsls.Last_Sale, `Oelsls.Order_#`,
Oelsls.Ltd_Units, Oelsls.Ltd_Sales From Oelsls, Invt Where Oelsls.Part_ID =
Invt.Part_ID" & " And `Oelsls.Cust_#` = " & PBV_lngCustomerNumber

I get an error: Unkown column `Oelsls.Order_#` in 'field list`

Any idea, Bill?
"Bill Karwin" <bi**@karwin.com> wrote in message
news:cn********@enews4.newsguy.com...
Joel wrote:
Thank you for responding Bill. If I run the Sql statemeny like this:

"Select Part_ID, Last_Sale, `Order_#`, Ltd_Units, Ltd_Sales From Oelsls
Where `Cust_#` = " & PBV_lngCustomerNumber

It works!


Okay, maybe failing to put Order_# in backticks was confusing to MySQL,
and it blamed it on the _next_ token it saw, which was Oelsls.Ltd_Units.

Have you tried your original query using the backticks every time
Order_# is mentioned? Be sure to quote your table names and field names
that contain special characters.

Regards,
Bill K.

Jul 20 '05 #5
Joel wrote:
I get an error: Unkown column `Oelsls.Order_#` in 'field list`


Oelsls.`Order_#`

Bill K.
Jul 20 '05 #6


IT WORKED!!!!! Thanks a million Bill!!!

"Bill Karwin" <bi**@karwin.com> wrote in message
news:cn********@enews3.newsguy.com...
Joel wrote:
I get an error: Unkown column `Oelsls.Order_#` in 'field list`


Oelsls.`Order_#`

Bill K.

Jul 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Kostatus | last post: by
117 posts views Thread by Peter Olcott | last post: by
18 posts views Thread by Ian Stanley | last post: by
28 posts views Thread by Jon Davis | last post: by
6 posts views Thread by Ammar | last post: by
2 posts views Thread by Mike Collins | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.