query problem

T

toby

i 've linked an excel data base file with column data A to H, where column A
are the type of the data.
ie.
column
A B C D E F
x eya kd jad jlf
x df fd df df
y ........
y ..... ..
z ....
z .....
i 've made an query for choosing rows of data with "x" or "z" in column A
from the database. i 've opened the query to check and it's ok. But next
time when i open the query again, it says that "numeric field overflow". So
what is the problem?! is there any mistake when i make the query?!
but if there is setting problem, then why i can make the query successfully
first time ?!

Thankyou.
 
J

John Vinson

i 've linked an excel data base file with column data A to H, where column A
are the type of the data.
ie.
column
A B C D E F
x eya kd jad jlf
x df fd df df
y ........
y ..... ..
z ....
z .....

This is very blatantly a spreadsheet, NOT a properly normalized table.
i 've made an query for choosing rows of data with "x" or "z" in column A
from the database. i 've opened the query to check and it's ok. But next
time when i open the query again, it says that "numeric field overflow". So
what is the problem?! is there any mistake when i make the query?!

I don't have any idea, because you haven't given me a clue what the
query might be. Could you please open the Query in SQL view and post
the SQL here?
 
T

toby

i 've made a sql demand like this :
SELECT [test].[cat_no], [test].[CLSCODE], [test].[cat], [test].[isbn],
[test].[title], [test].[author], [test].[pub_date], [test].[price_cc],
[test].[publisher]
FROM test
WHERE [test].[clscode]="120" or [test].[clscode]="130" or
[test].[clscode]="141" or [test].[clscode]="140" or [test].[clscode]="163"
or [test].[clscode]="165" or [test].[clscode]="160" or
[test].[clscode]="272" or [test].[clscode]="271" or [test].[clscode]="277"
or [test].[clscode]="276" or [test].[clscode]="274" or
[test].[clscode]="273" or [test].[clscode]="274" or [test].[clscode]="311";
 
J

John Vinson

i 've made a sql demand like this :
SELECT [test].[cat_no], [test].[CLSCODE], [test].[cat], [test].[isbn],
[test].[title], [test].[author], [test].[pub_date], [test].[price_cc],
[test].[publisher]
FROM test
WHERE [test].[clscode]="120" or [test].[clscode]="130" or
[test].[clscode]="141" or [test].[clscode]="140" or [test].[clscode]="163"
or [test].[clscode]="165" or [test].[clscode]="160" or
[test].[clscode]="272" or [test].[clscode]="271" or [test].[clscode]="277"
or [test].[clscode]="276" or [test].[clscode]="274" or
[test].[clscode]="273" or [test].[clscode]="274" or [test].[clscode]="311";

I don't see why this should give you an Overflow error at all -
perhaps your database is corrupt! You can make the query a bit more
efficient by using the IN() clause rather than all the OR's -

WHERE [test].[clscode] IN ("120", "130", "141", "140", ...)
 
T

toby

i've solved the problem. it's the matter of cell properties.
thx John

John Vinson said:
i 've made a sql demand like this :
SELECT [test].[cat_no], [test].[CLSCODE], [test].[cat], [test].[isbn],
[test].[title], [test].[author], [test].[pub_date], [test].[price_cc],
[test].[publisher]
FROM test
WHERE [test].[clscode]="120" or [test].[clscode]="130" or
[test].[clscode]="141" or [test].[clscode]="140" or [test].[clscode]="163"
or [test].[clscode]="165" or [test].[clscode]="160" or
[test].[clscode]="272" or [test].[clscode]="271" or [test].[clscode]="277"
or [test].[clscode]="276" or [test].[clscode]="274" or
[test].[clscode]="273" or [test].[clscode]="274" or
[test].[clscode]="311";

I don't see why this should give you an Overflow error at all -
perhaps your database is corrupt! You can make the query a bit more
efficient by using the IN() clause rather than all the OR's -

WHERE [test].[clscode] IN ("120", "130", "141", "140", ...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top