Re: Comparing an alias ...

2001-12-01 Thread Julio Faerman
HAVING worked OK thus . - > What would this mean? The WHERE clause is what determines what rows > will be used in the GROUP BY functions, e.g. MIN(). How do you know > what rows to use when you need to know what rows to use before you > can figure out the criteria for what rows to use? > Tryin

Re: Comparing an alias ...

2001-12-01 Thread Carl Troein
Julio Faerman writes: > Hi ... I am need the following query to work : > SELECT > min(my_colum) as MINIMAL_VALUE > WHERE > MINIMAL_VALUE > 10 > > The query is not EXACTLY as this one, but i think it is enough to get you > the idea of my problem... What would this mean? The WHERE clause

Comparing an alias ...

2001-11-30 Thread Giuseppe Maxia
It won't work this way. SELECT min(my_column) as MINIMAL_VALUE will give you ONE record only. Therefore, an additional condition (which you can get with HAVING, not WHERE) will be meaningless. e.g: SELECT min(my_column) as MINIMAL_VALUE FROM mytable HAVING MINIMAL_VALUE > 10 will return an

Re: Comparing an alias ...

2001-11-30 Thread sherzodR
Try to use HAVING instead of WHERE. I hope that will help. Julio Faerman wrote: JF: Hi ... I am need the following query to work : JF: SELECT JF: min(my_colum) as MINIMAL_VALUE JF: WHERE JF: MINIMAL_VALUE > 10 JF: JF: The query is not EXACTLY as this one,

Comparing an alias ...

2001-11-30 Thread Julio Faerman
Hi ... I am need the following query to work : SELECT min(my_colum) as MINIMAL_VALUE WHERE MINIMAL_VALUE > 10 The query is not EXACTLY as this one, but i think it is enough to get you the idea of my problem... Thnx for any help ! []~S julio