Buenas,
Quiero exportar una consulta en SQL SERVER 2008 que se genere automáticamente y diariamente en cierta ubicación del equipo a un archivo de texto. Que comando debo agregar o como debo hacerlo, esta es la consulta:
use MonitorDB
SELECT site.site_name as NOMBRE,
site.site_addr1 AS DIRECCION_1,
site.site_addr2 AS DIRECCION_2,
site.city_name AS POBLACION,
site.corpacct_servco_no AS CUENTA_CORPORATIVA,
site.udf3 AS CONTRATO,
site.phone1 AS TELF1,
site.phone2 as TELF2,
site_type.descr AS TIPO_INSTALACION,
site.state_id AS DEPARTAMENTO,
site.udf4 AS NIT,
system.ati_hours AS CONTROL_TEST_HORAS,
system.install_date as FECHA_INSTALACION,
system.oos_start_date AS FECHA_INICIO_OOS
FROM site INNER JOIN system ON site.site_no=system.site_no INNER JOIN site_type ON site.sitetype_id=site_type.sitetype_id
where system.install_date <= getdate()-1 and system.install_date >= getdate()-3 and system.ati_hours is not NULL
Se los agradeceria es super urgente. Gracias.