I would like to export a table selecting only certain fields using a query rather than using the export wizard – as once my query is written, I only have to hit run everytime,
saving me time.
I have written the script of the variables I want (see below). but need to know if there is anything I can add to the script to be able to create a csv table from it
by just clicking run once.
select
distinct [Customer Ref No]
[Customer Ref No],
[Customer Title],
[Customer Forename],
[Customer Surname],
[Company],
[Address 1],
[Address 2],
[Address 3],
[City],
[County],
[Postcode]
fromclient.dbo.Bookers_2011