Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/08/2010, 09:45
pykbe
 
Fecha de Ingreso: marzo-2007
Mensajes: 15
Antigüedad: 17 años
Puntos: 2
DTS problema con datetime

Bueno resulta q estoy trabajando con unha tranformacion que va desde la BD a un .txt

El detalle es q cuando hago tranformacion en los campos q son datetime me crea unos espacion en blanco los cuales no estoy agregando, ya hice un TRIM, Replace(fecha," ","")

anexo el query del dts

SELECT REPLICATE('0',9) as COL1,
'004' as COL2,
CONVERT(CHAR(7) , REPLACE('VP00000','VP','00')) as COL3,
REPLICATE(' ',20) as COL4,
'**' as COL5,
'YH' as COL6,
'53' as COL7,
REPLICATE(' ',2) as COL8,
REPLICATE(' ',20) as COL9,
'3' as COL10,
'0' as COL11,
convert(char(10), getDate(), 111) as COL12,
'009' as COL13,
convert(char(10), getDate(), 111) as COL14,
REPLICATE(' ',6) as COL15,
REPLICATE('0',3) as COL16,
REPLICATE('0',3) as COL17,
REPLICATE('0',4) as COL18,
REPLICATE(' ',7) as COL19,
REPLICATE(' ',4) as COL20,
REPLICATE(' ',2) as COL21,
' ' as COL22,
' ' as COL23,
' ' as COL24,
' ' as COL25,
' ' as COL26,
' ' as COL27,
' ' as COL28,
REPLICATE(' ',30) as COL29,
REPLICATE(' ',30) as COL30,
' ' as COL31,
REPLICATE(' ',4) as COL32,
' ' as COL33,
' ' as COL34,
' ' as COL35,
' ' as COL36,
REPLICATE(' ',6) as COL37,
REPLICATE(' ',3) as COL38,
REPLICATE(' ',20) as COL39,
REPLICATE(' ',10) as COL40,
REPLICATE(' ',5) as COL41,
REPLICATE('0',12) as COL42,
REPLICATE('0',12) as COL43,
REPLICATE('0',12) as COL44,
REPLICATE('0',10) as COL45,
REPLICATE('0',10) as COL46,
REPLICATE('0',10) as COL47,
REPLICATE('0',10) as COL48,
REPLICATE('0',10) as COL49,
REPLICATE('0',7) as COL50,
REPLICATE('0',7) as COL51,
P.TIPO_MOVI as COL52,
REPLICATE('0',10) as COL53,
REPLICATE('0',10) as COL54
FROM T_PERMISOS P
WHERE P.NUME_ETAP =2 AND P.ESTA =1 AND (P.CHEC_ENVI_DIFU IS NULL OR P.CHEC_ENVI_DIFU = 0) AND FECH_ENVI_SIGA IS NULL;

en las columnas 12 y 14 es tengo ese problema me genera 6 espacios en blanco de mas.