I have a cursor that scrolls through records using a group by statement and for each individual group it exports to a csv file all the records for that group and then emails it to a sales manager to check and then email onto a customer.
Since it is for customer use - I really need the csv file to have field names (so the customers know what information they are looking at) - which bcp doesn't do. Also I am using the pound symbol £ -which bcp doesn't like.
So, does anyone know if this is possible to do.
- can I run DTS in a stored procedure AND pass in variables to it i.e. the customerid and it will export a csv file
- can I modify bcp to do this
- Or is there another way??
Any help appreciated
Since it is for customer use - I really need the csv file to have field names (so the customers know what information they are looking at) - which bcp doesn't do. Also I am using the pound symbol £ -which bcp doesn't like.
So, does anyone know if this is possible to do.
- can I run DTS in a stored procedure AND pass in variables to it i.e. the customerid and it will export a csv file
- can I modify bcp to do this
- Or is there another way??
Any help appreciated