Una Ayudita
Publicado por eljhonb (124 intervenciones) el 10/04/2007 02:16:16
tengo el siguiente script y no encuentro cuál es el error, si alguien me puede colaborar estaría muy agradecido.
Declare @Comando varchar(2048)
Set @Comando='Exec Master..XP_CmdShell ' 'bcp "select Right(' '000000000000' '+ Rtrim(lTrim(Id_Aportante)) ,12), Id_Tipo_Afiliado,Right(' '000000000000' ' + RTrim(ltrim(Id_Aportante)),12),Right(' '00000000' ' + rTrim(ltrim(Salario)) , 8),Fecha_Confirmacion from BDD_PIAP.dbo.tb_piap_salario where estado = 1" queryout "c:\salsub1.txt " -c -T -t " " ' ' '
Exec(@Comando)
De antemano muchas Gracias!
Declare @Comando varchar(2048)
Set @Comando='Exec Master..XP_CmdShell ' 'bcp "select Right(' '000000000000' '+ Rtrim(lTrim(Id_Aportante)) ,12), Id_Tipo_Afiliado,Right(' '000000000000' ' + RTrim(ltrim(Id_Aportante)),12),Right(' '00000000' ' + rTrim(ltrim(Salario)) , 8),Fecha_Confirmacion from BDD_PIAP.dbo.tb_piap_salario where estado = 1" queryout "c:\salsub1.txt " -c -T -t " " ' ' '
Exec(@Comando)
De antemano muchas Gracias!
Valora esta pregunta


0