SQL Query problem
From: Carl Howarth (carl.howarth_at_m-s-solutions.co.uk)
Date: 04/27/04
- Next message: Lascaris Georgia: "using temporary tables in user defined functions"
- Previous message: vishal subramaniam: "RE: Userform to add and update a table"
- Next in thread: Andrew J. Kelly: "Re: SQL Query problem"
- Reply: Andrew J. Kelly: "Re: SQL Query problem"
- Reply: Steve Kass: "Re: SQL Query problem"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 27 Apr 2004 10:57:55 +0100
Hi there,
I am attempting to create a query that works out a percentage and produces
counts where percentages are between certain levels. I have to use case
statements to pull back the correct figures to work out the percentages
with, however when I query on the results criterion entered appears to be
ignored/confused:
WHERE CAST(((case value1a when 0 then value2a else value1a end /
case value1b when 0 then value2b else value1b end) * 100) AS
DECIMAL(10,2)) BETWEEN 0 AND 10
This pulls back data where the values of the above calculation are not
actually between 0 and 10.
Any ideas please?
Cheers, Carl
carl.howarth@m-s-solutions.co.uk
- Next message: Lascaris Georgia: "using temporary tables in user defined functions"
- Previous message: vishal subramaniam: "RE: Userform to add and update a table"
- Next in thread: Andrew J. Kelly: "Re: SQL Query problem"
- Reply: Andrew J. Kelly: "Re: SQL Query problem"
- Reply: Steve Kass: "Re: SQL Query problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|