Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

strange problem

Status
Not open for further replies.

soslippy

Programmer
Joined
Jul 8, 2002
Messages
8
Location
GB
hi everyone,
i'm wanting to write this...

SELECT *
FROM Table1
WHERE (([field1]+[field2]+[field3]+[field4]+[field5]+[field6]+[field7])-([field8]+[field9]+[field10]+[field11]+[field12]))/21*100 <= [Score?]

it asks for Score? when i run it but give stranges results, like returning the ones with scores of 100 when i say Score? is 50.
if however i put...

SELECT *
FROM Table1
WHERE (([field1]+[field2]+[field3]+[field4]+[field5]+[field6]+[field7])-([field8]+[field9]+[field10]+[field11]+[field12]))/21*100 <= 50

it works ok. can anyone help me?
 
Hi

Could it be treating [Score] as a string?

Try

SELECT *
FROM Table1
WHERE (([field1]+[field2]+[field3]+[field4]+[field5]+[field6]+[field7])-([field8]+[field9]+[field10]+[field11]+[field12]))/21*100 <= Val([Score?])

Regards


Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
kenneth.reay@talk21.com
 
yes that works perfectly, thx v much :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top