Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Bases de datos > MS SQL Server
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #6  
Antiguo 26-10-2010
Ledian_Fdez Ledian_Fdez is offline
Miembro
 
Registrado: jun 2006
Ubicación: Ciudad Habana, Cuba
Posts: 242
Poder: 21
Ledian_Fdez Va por buen camino
Angry Error

Cita:
Empezado por Kipow Ver Mensaje
Código SQL [-]
CREATE   PROCEDURE Extra_calculo_diaferiados

@fechaI datetime,
@fechaF datetime

AS

SELECT A, B, C, sum(D) as Dias, sum(O) as Cobrar, min(Fecha) as FIni
FROM   Tabla
WHERE (fecha between  @fechaI and @fechaF)
GROUP BY A, B, C
ORDER BY A, B

:saber:
Fecha is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 21:24:51.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi