ayuda exportar datos a txt
Publicado por mario (1 intervención) el 10/05/2013 23:25:08
necesito su ayuda por favor, tengo un procedimiento con una tabla temporal y la informacion que me da este procedimiento necesito exportarlo a formato txt, e intentado utilizar la instruccion OUTPUT TO, el procedimiento que estoy utlizando es el siguiente
SELECT frep,year,mes,dia,roomCapacity,isnull(roomsNotAvailMaint,0),isnull(roomsNotAvailOther,0),
isnull(roomSold,0),isnull(RoomRevenue,0.00),isnull(roomArrivals,0),isnull(roomDepartures,0),
isnull(totalRevenue,0.00),isnull(foodRevenue,0.00)
FROM ResultTable
OUTPUT to 'c:\pctr.txt'
cuando lo ejecuto asi me da un error de syntax error near 'to' on line 82, si coloco ; despues del nombre de la tabla
SELECT frep,year,mes,dia,roomCapacity,isnull(roomsNotAvailMaint,0),isnull(roomsNotAvailOther,0),
isnull(roomSold,0),isnull(RoomRevenue,0.00),isnull(roomArrivals,0),isnull(roomDepartures,0),
isnull(totalRevenue,0.00),isnull(foodRevenue,0.00)
FROM ResultTable;
OUTPUT to 'c:\pctr.txt'
ahora el error me dice que es en la instruccion OUTPUT
me podrian ayudar por favor, si se puede utilizar esta intruccion o cual puedo usar para exportar la informacion de mi procedimiento al formato txt
SELECT frep,year,mes,dia,roomCapacity,isnull(roomsNotAvailMaint,0),isnull(roomsNotAvailOther,0),
isnull(roomSold,0),isnull(RoomRevenue,0.00),isnull(roomArrivals,0),isnull(roomDepartures,0),
isnull(totalRevenue,0.00),isnull(foodRevenue,0.00)
FROM ResultTable
OUTPUT to 'c:\pctr.txt'
cuando lo ejecuto asi me da un error de syntax error near 'to' on line 82, si coloco ; despues del nombre de la tabla
SELECT frep,year,mes,dia,roomCapacity,isnull(roomsNotAvailMaint,0),isnull(roomsNotAvailOther,0),
isnull(roomSold,0),isnull(RoomRevenue,0.00),isnull(roomArrivals,0),isnull(roomDepartures,0),
isnull(totalRevenue,0.00),isnull(foodRevenue,0.00)
FROM ResultTable;
OUTPUT to 'c:\pctr.txt'
ahora el error me dice que es en la instruccion OUTPUT
me podrian ayudar por favor, si se puede utilizar esta intruccion o cual puedo usar para exportar la informacion de mi procedimiento al formato txt
Valora esta pregunta


0