robert693
Starting Member
42 Posts |
Posted - 2010-11-15 : 11:12:47
|
Hello,I am running a bcp command out of a SQL Database and dumping the data in a CSV file. I am then trying to upload the data to the Calendar in MS Outlook. I go through the Import and Export Wizard in Outlook to upload the data. I choose Import from another file ?Comma Separated Values(Windows) and then I get an error message that says that there was an error in the comma separated values(windows) translator while initializing a translator to build a field map. I have exported the calendar out of Outlook to a CSV file and copied and pasted the field names in the Outlook csv file to the bcp csv file. When I did this the file is imported to Outlook just fine. I have also copied the field names from the Outlook csv file, into the bcp command and it sill produces a csv file that will not upload into Outlook. Is there something that I am missing? Here is the bcp command:BCP "SELECT 'Subject', 'Start Date', 'Start Time', 'End Date', 'End Time', 'All day event', 'Reminder on/off', 'Reminder Date', 'Reminder Time', 'Meeting Organizer', 'Required Attendees', 'Optional Attendees', 'Meeting Resources', 'Billing Information', 'Categories', 'Description', 'Location', 'Mileage', 'Priority', 'Private', 'Sensitivity', 'Show time as' UNION ALL SELECT [CPT].[Short_Desc]+' '+[vw_Schedule].[Notes], CONVERT(CHAR(8), [vw_Schedule].[App_DtTm],1), CONVERT(CHAR(8), [vw_Schedule].[App_DtTm],8), CONVERT(CHAR(8), [vw_Schedule].[App_DtTm],1), CONVERT(varchar(8),DATEADD(n,([vw_Schedule].[Duration_time]/6000),DATEADD(dd,-DATEDIFF(dd,0,[vw_Schedule].[App_DtTm]),[vw_Schedule].[App_DtTm])),108), 'FALSE' as [All day event], 'FALSE' as [Reminder on/off], CONVERT(CHAR(8), [vw_Schedule].[App_DtTm],1), CONVERT(CHAR(8), [vw_Schedule].[App_DtTm],8), [vw_Schedule].[STF_INITIALS], '' as [Required Attendees], '' as [Optional Attendees], '' as [Meeting Resources], '' as [Billing Information], '' as [Categories], [vw_Schedule].[Activity], [vw_Schedule].[LOC_INITIALS], '' as [Mileage], '' as [Priority], '' as [Private], '' as [Sensitivity], '' as [Show time as] FROM [MOSAIQ].[dbo].[vw_Schedule] [vw_Schedule] LEFT OUTER JOIN [MOSAIQ].[dbo].[CPT] [CPT] ON [vw_Schedule].[Activity]=[CPT].[Hsp_Code] WHERE [vw_Schedule].[STF_INITIALS] <> '' and CONVERT( Varchar(12), [vw_Schedule].[App_DtTm],1) = CONVERT( Varchar(12), GetDate(),1) AND ([vw_Schedule].[Activity]='CONSULT' OR [vw_Schedule].[Activity]='MTG' OR [vw_Schedule].[Activity]='VAC')" queryout C:\Scheduletext.csv -c -t, -SMosaiqreports -T |
|