Ver Mensaje Individual
  #6 (permalink)  
Antiguo 01/12/2011, 16:49
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 17 años, 8 meses
Puntos: 774
Respuesta: No inserta en tabla!! Sp

a ver:
ejecutas esto y no regresa nada:

SELECT ''+@PLNID+'','PLANOGRAM','Planogram'
+','+A.PLANOGRAM+','+' '+','
+CAST (B.BASE_WIDTH AS VARCHAR)+','
+CAST (B.HEIGHT AS VARCHAR)+','
+CAST(B.DEPTH AS VARCHAR)+','
+CAST (B.COLOUR AS VARCHAR)+','
+CAST (B.BACK_DEPTH AS VARCHAR)+','+'1'+','
+CAST (B.WIDTH AS VARCHAR)+','
+CAST(B.BASE_HEIGHT AS VARCHAR)+','
+CAST(B.BASE_DEPTH AS VARCHAR)+'1'+','
+CASE WHEN CAST(B.COLOUR AS VARCHAR)='0' THEN '16777215' ELSE CAST(B.COLOUR AS VARCHAR) END+','+'1'+','+' '+','+'0'+','+'1'+','
+CASE WHEN CAST(B.COLOUR AS VARCHAR)='0' THEN '16777215' ELSE CAST(B.COLOUR AS VARCHAR) END+','+'1'+','+'0'+','+'0'+','
+CAST (B.BASE_DEPTH AS VARCHAR)


FROM AGO_CAT_ACN_PLANOGRAMS A WITH (NOLOCK)
INNER JOIN AGO_CAT_ACN_SECTION B WITH (NOLOCK)
ON A.PLN_ID = B.PLN_ID
WHERE A.PLN_ID=@PLNID


Tus variables tienen valores??? porque tanto cast y comas??

Saludos!
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me