NOTE: I'm not great with SQL. But I really thought I'd be able to tackle this one...
One of our divisions needs a daily dump of the customer table into an XML file saved to a network location. It's to integrate data from the ERP to a design database.
The vendor provided the script to do it manually and I've been doing that, but it really needs to be run nightly.
Here's the script:
SQL
SELECTTOP(100)PERCENTCustomer_1.NameASBilltoName,dbo.Address.Address1ASBillToAddress,dbo.Address.CityASBillToCity,dbo.Address.ZipASBillToZip,dbo.Address.StateASBilltoState,dbo.Customer.NameASShiptoName,Address_1.Address1ASShipToAddress,Address_1.CityASShipToCity,Address_1.ZipASShipToZip,Address_1.StateASShipToState,dbo.Customer.DefManufacturingPlantLink,dbo.Customer.BillToLink,dbo.Customer.CustomerLinkASshiptolink,dbo....