1select :
select id_time_scale from sales where id_time_scale=31 group by
id_day_part,id_part,id_nomencl
result:
299 rows where id_time_scale=26........31
2select :
select id_time_scale from sales where id_time_scale=31
result:
90 rows where id_time_scale=31
3select :
select id_time_scale from sales group by id_day_part,id_part,id_nomencl
having id_time_scale=31
result:
90 rows where id_time_scale=31
I dont understand result of SELECT1 . Why server give me rows where
id_time_scale=26 , 27......
please help.
YuriV. Kurilin
ku...@integris.ru
Note: These are my own views and not that of Goldman Sachs.
select id_time_scale, count(id_time_scale)
from sales
group by id_time_scale
will give you the number of rows for each instance of id_time_scale.
Using with out an aggregate is I believe a cartesian product and every row
is selected.
From the code fragment below you don't need the group by as the simple
select is more efficient and does what you want
--
Steve Prowse
All statements are mine and mine alone until I'm told otherwise.
The good thing about procrastination?
You've always got something planned for tomorrow.
:
:
: