Вниз
Скачать: CL | DM;

Помогите с запросиком а   Найти похожие ветки 

← →
GAlex   (2003-04-08 13:41) [0]

select top 10 cast(convert(char,call_time,104) as datetime),sum(money)
from dbo.user_log
group by cast(convert(char,call_time,104) as datetime)
order by cast(convert(char,call_time,104) as datetime)

Работает, а
select top 10 cast(convert(char,call_time,104) as datetime) as ddd,sum(money)
from dbo.user_log
group by ddd
order by ddd
Не хочет =(


← →
chdv   (2003-04-08 13:53) [1]

и не будет.
попробуй так
select ddd, sum(money)
from
(select top 10
cast(convert(char,call_time,104) as datetime) as ddd,
money
from dbo.user_log)
group by ddd
order by ddd


← →
Johnmen ©   (2003-04-08 14:00) [2]

Использование алиасов полей недопустимо при обращении к ним...


← →
GAlex   (2003-04-08 14:42) [3]

2 chdv так не хочет работать =(


← →
ЮЮ ©   (2003-04-08 14:54) [4]

select ddd, sum(money)
from
(select top 10
cast(convert(char,call_time,104) as datetime) as ddd,
money
from dbo.user_log) a
group by ddd
order by ddd



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.01 c
1-77025
Ajax
2003-04-13 15:03
2003.04.24
Обои для TShellListView


14-77127
Feel
2003-04-07 20:44
2003.04.24
WinAPI


14-77168
Vlad Oshin
2003-04-09 10:34
2003.04.24
Рассказ.


14-77110
VAleksey
2003-04-07 09:18
2003.04.24
Комната квартира в Москве


3-76813
SaperXL
2003-04-06 19:35
2003.04.24
Связанные таблицы




   Наверх