Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > SQL
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #8  
Antiguo 14-12-2005
hmoner hmoner is offline
Miembro
 
Registrado: may 2005
Posts: 52
Poder: 22
hmoner Va por buen camino
hola FOURIER nuevamente
Aqui he ordenado un poquitin la consulta... la he ingresado, pero me ha dado error en la linea 10, posicion 1...

Aqui la imagen del error, con el mensaje... como que no conoce alguna sentencia...

http://img231.imageshack.us/img231/5...userror3xp.jpg

Código SQL [-]
SELECT CLIENTE.NROSOCIO AS SOCIO, CLIENTE.NOMBRE AS CLIENTE, CLIENTE.APELLIDO AS APELLIDO, CLIENTE.ESTABLECIMIENTO AS ESTABLECIMIENTO, 
 (select SUM(case when espromoesp=true then 0 else FACTURACION.MONTO end) 
 from Facturacion as F 
 where Facturacion.idcliente=cliente.id) AS M_NORMAL, 
 (select SUM(case when espromoesp=true then FACTURACION.MONTO else 0 end) 
 from facturacion as F 
 where Facturacion.idcliente=cliente.id) AS M_ESPECIAL, 
 (select SUM(FACTURACION.MONTO) 
 from Facturacion as 
 where Facturacion.idcliente=cliente.id) AS TOT_MONTO, 
 (select sum(facturacion.puntos) 
 from Facturacion 
 where idcliente=cliente.id) as Totalpuntos,(SELECT SUM(B.TOTALPUNTOS) 
 FROM CANJE B WHERE B.IDCLIENTE = cliente.id) as canjea,totalpuntos-canjea as puntos_actuales 
 FROM CLIENTE where cliente.idpromo = 2
 ORDER BY CLIENTE.APELLIDO ASC, CLIENTE.ESTABLECIMIENTO ASC

Me pregunto como podria hacer para enviarte las estructura de las tablas para que puedas probar, ya que yo uso el motor NEXUS... www.nexusdb.com

Si quieres, armo las tablas en mySQL o en algun formato que digas y te las envio... (no se si con registros de ejemplo, ya que nexus no posee ninguna utilidad para exportar o convertir las tablas, ni registros)

Muchas gracias por tu ayuda
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 00:11:59.


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