Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Put data from Outlook into SQL database

Author  Topic 

robert693
Starting Member

42 Posts

Posted - 2010-10-13 : 15:00:08
Hello,

I have a database with meeting information that I want to put into Outlook. The meeting information is in a table called Schedule with the fields that I need and other fields that I don't need. I was wondering what the best way to do this would be. I have used a BCP command to dump the data into a CSV file and the import this into Oulook but the BCP command does not export the field headers, just the data. Is there a way to link outlook to the database or any other way to move the data? Thank you for your answer!

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-10-13 : 15:49:50
don't know about outlook reading from sql, but u can fix your bcp script by manually adding the field names like this

SELECT 'field1', 'field2', 'field3' ...
UNION ALL
SELECT a, b, c...
FROM....
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-10-13 : 15:52:35
just found these...might help

http://www.sqlservercentral.com/articles/DTS/couplingoutlooktosqlserver/1693/

http://www.outlookcode.com/article.aspx?ID=25
Go to Top of Page

robert693
Starting Member

42 Posts

Posted - 2010-10-13 : 16:13:19
Does the UNION ALL put the headers at the top of the column in the result? I thought that it might not necessiarly do this in all cases and some results might have the headers at the end of the resulting file. I will try it and look at the liks as well. Thank you!
Go to Top of Page
   

- Advertisement -