Usuário com melhor resposta
Select TOP

Pergunta
-
Galera,
Não consigo implementar o select top na query abaixo, já tentei tirar o group by e o order by porém continua com o erro....poderiam por favor me dar uma luz.
select max(Throughput) as maxtput,msgTime
FROM RLC_DL_3G_Throughput_Huawei_Sul
WHERE CollectionName = 'Job_dados_3G_DL_S1'
and TaskName = 'vivo_dados_DL_850_3G' GROUP BY msgTime,Throughput ORDER by Throughput DESCDesde já meu muito obrigado!
Respostas
-
select
TOP 10 max(Throughput) as maxtput,
msgTime
FROM
RLC_DL_3G_Throughput_Huawei_Sul
WHERE
CollectionName = 'Job_dados_3G_DL_S1'
and
TaskName = 'vivo_dados_DL_850_3G'
GROUP
BY msgTime,Throughput ORDER by Throughput DESC
qual a mensagem de erro que te retorna ?
tenta assim por favor
- Marcado como Resposta Fernanda Simões terça-feira, 10 de agosto de 2010 15:17
Todas as Respostas
-
select
TOP 10 max(Throughput) as maxtput,
msgTime
FROM
RLC_DL_3G_Throughput_Huawei_Sul
WHERE
CollectionName = 'Job_dados_3G_DL_S1'
and
TaskName = 'vivo_dados_DL_850_3G'
GROUP
BY msgTime,Throughput ORDER by Throughput DESC
qual a mensagem de erro que te retorna ?
tenta assim por favor
- Marcado como Resposta Fernanda Simões terça-feira, 10 de agosto de 2010 15:17
-
declare @RLC_DL_3G_Throughput_Huawei_Sul as table (Throughput numeric(10,2),msgTime char(50),CollectionName char(50),TaskName char(50)) insert @RLC_DL_3G_Throughput_Huawei_Sul values('1000.1','teste','Job_dados_3G_DL_S1','vivo_dados_DL_850_3G') insert @RLC_DL_3G_Throughput_Huawei_Sul values('200.31','teste','Job_dados_3G_DL_S1','vivo_dados_DL_850_3G') insert @RLC_DL_3G_Throughput_Huawei_Sul values('134.34','teste','Job_dados_3G_DL_S1','vivo_dados_DL_850_3G') insert @RLC_DL_3G_Throughput_Huawei_Sul values('569.90','teste','Job_dados_3G_DL_S1','vivo_dados_DL_850_3G') insert @RLC_DL_3G_Throughput_Huawei_Sul values('5000.20','teste','Job_dados_3G_DL_S1','vivo_dados_DL_850_3G') insert @RLC_DL_3G_Throughput_Huawei_Sul values('1043.40','teste','Job_dados_3G_DL_S1','vivo_dados_DL_850_3G')
select TOP 3 max(Throughput) as maxtput, msgTime FROM @RLC_DL_3G_Throughput_Huawei_Sul WHERE CollectionName = 'Job_dados_3G_DL_S1' and TaskName = 'vivo_dados_DL_850_3G' GROUP BY msgTime,Throughput ORDER by Throughput DESC
criei uma tabela temporaria para simular tenta assim que vai dar certinho .
se for util esta informacao vote.
boa sorte se der algum erro
ou quizer algo diferente poste tmb
-
-