MsSQL2012: oprette agent job til export af data i tabulator sep. fil
Jeg har lavet følgende select og får derfor en masse data til vores telefonsystem. Data bruges i forbindelse med kald ind som så slår information op på hvem der ringer...rigtig smart. Som det er nu er det en manuel opgave og jeg ville gerne have sql udtrækket ned som et SQL server agent job. Jeg har forsøgt forgæves at lede på nettet vha. google, men finder ikke rigtig noget brugbart.Håber der er en MSsql server haj som har løsningen på denne og som kan guide mig igennem.
Min select ser således ud og virker som sagt fint.
SELECT C.[Company Name] AS "_phonebook._company"
,C.[Name] AS "_phonebook._name"
,C.[E-Mail] AS "_phonebook._email"
,CASE
WHEN C.[Phone No_] = '' THEN ''
ELSE '0'+C.[Phone No_]
END AS "_phonebook._number"
,CASE
WHEN C.[Mobile Phone No_] = '' THEN ''
ELSE '0'+C.[Phone No_]
END AS "_phonebook._mobilephone"
,C.[Fax No_] AS "_phonebook._fax"
,C.[Name 2] AS "_phonebook._user01"
,C.[Address] AS "_phonebook._line1"
,C.[Address 2] AS "_phonebook._line2"
,C.[Post Code] AS "_phonebook._postalcode"
,C.[City] AS "_phonebook._city"
,C.[Country_Region Code] AS "_phonebook._country"
,C.[No_] as "_phonebook._user04"
,'' as "_phonebook._user05"
,'' as "_phonebook._user06"
,'' as "_phonebook._user07"
,C.[Salesperson Code] as "_phonebook._user08"
,C.[Adminperson] as "_phonebook._user09"
,'' as "_phonebook._user10"
,'' as "_phonebook._user11"
,'' as "_phonebook._user12"
,'' as "_phonebook._user13"
,'' as "_phonebook._user14"
,'' as "_phonebook._user15"
,'' as "_phonebook._user16"
,'' as "_phonebook._user17"
,'' as "_phonebook._user18"
,'' as "_phonebook._user18"
,'' as "_phonebook._user20"
FROM [xx_Drift].[dbo].[x$Contact] AS C
LEFT OUTER JOIN [xx_Drift].[dbo].[x$Contact Business Relation] AS CBR
ON C.[No_] = CBR.[Contact No_]
WHERE [Fax No_]<>'xxxxxxxx' AND
C.[Phone No_]<>'' or
C.[Mobile Phone No_]<>''
På forhånd tusind tak.