Вниз
Скачать: 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.015 c
1-76890
Гость
2003-04-14 07:37
2003.04.24
Сравнить два LIstBox.


14-77122
Андрей22
2003-04-07 20:28
2003.04.24
Где можно найти исходники для программы


1-76874
Senator
2003-04-14 15:58
2003.04.24
MDI


3-76864
Jaxtor
2003-04-08 14:02
2003.04.24
Подтверждение транзакции в InterBase


14-77079
konstantinov
2003-04-05 21:45
2003.04.24
ASM и WinXP и т.п.




   Наверх