I have a request to export data one record at a time from SQL Server 2008 R2 into a file with the file named according to the record info. The table contains the following data:
LastName
FirstName
MI
DOB
Member_ID
Phone_Number
Email_Address
Address
City
State
Zip
Reason
Date_Created
Date_Exported
The query would only export records where Date_Exported is null. The Date_Exported would be entered when the record is exported to a file. The file should be named FirstName + LastName + Date_Created.
Any help with how to achieve this? The type of file would be best as .pdf; however, .csv would be fine also.
Any assistance would be hugely appreciated!