Ver Mensaje Individual
  #3 (permalink)  
Antiguo 27/08/2004, 07:31
Avatar de RsOfT
RsOfT
 
Fecha de Ingreso: marzo-2002
Ubicación: InterNET
Mensajes: 1.121
Antigüedad: 22 años, 2 meses
Puntos: 7
Le coloque unos AND q le faltaba y coloqué la S y H entre comillas simple asi:

Código:
SELECT SAP.shkzg, Sum(SAP.wrbtr)   - SAP.previews as Monto, 
       SAP2.shkzg, Sum(SAP2.wrbtr) - SAP2.previews as Monto2 
FROM SAP.SAPR3.BSID SAP, SAP.SAPR3.BSID SAP2
WHERE SAP.mandt = '400'        AND
      SAP.bukrs = 'RICA'       AND
      SAP.kunnr = '0001298492' AND
      SAP.shkzg = 'H'	       AND

      SAP2.mandt = '400'        AND
      SAP2.bukrs = 'RICA'       AND
      SAP2.kunnr = '0001298492' AND
      SAP2.shkzg = 'S'
GROUP By SAP.shkzg, SAP2.shkzg
Pero me da el siguiente error:
Código:
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'SAP.SAPR3.BSID'.
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'SAP.SAPR3.BSID'. 
Me señala la lína: SELECT SAP.shkzg, Sum(SAP.wrbtr) - SAP.previews as Monto,
__________________
.::RsOfT::.
--El que se aferra a lo conocido, nunca conocerá lo desconocido--
--Es intentando lo imposible como se realiza lo posible--
--Es de pésimo gusto contentarse con algo mediocre cuando lo excelente está a nuestro alcance--