Groups | Blog | Home
all groups > sql server odbc > october 2003 >

sql server odbc : SQL Statement...help please



Mark
10/16/2003 6:53:25 PM
Hi
I have this statement

SELECT jobcode, min(salary) as sal, min(Division) as Div, min(jobtitle) as
jobtitl, min(ID)as thisId, min(category) as thiscat
FROM jobs group by jobcode

And it works fine but now i need to filter Division
i've tried using this....
WHERE Division = "Tec"

but that wont work, not sure why
can anyone tell me how to apply the filter to that statement

Thanks
Mark

p.s. Cant use DISTINCT, it wont work!






Steve Thompson
10/17/2003 12:43:24 PM
[quoted text, click to view]

Is it the double quotes? How about:

WHERE Division = 'Tec'

Steve

Small Small Little
10/21/2003 12:29:52 AM
For 'group by', should 'having' be used instead of 'where'?

[quoted text, click to view]
AddThis Social Bookmark Button