Hello All,
I have a question that I hope that you all can help me answer. I have a customer that is using Cisco Call manager to import Client Matter Codes into his call manager. To import the CMCs, he uses the Bulk Administration tool or BAT to import them via a .csv file. What he wants to do is automate the import. Well, Cisco doesn't currently have a way to automate this import so I had the thought that maybe we could import the text directly into the CMCs table in the SQL database. I did a little research and found out that SQL has an import/export tool call bcp. I used bcp to export the table and here's an example of one line in the table:
1111111111111-1111111111-1111111111111 123456 Plaintiff vs. Defendant 111111111-1111-1111-11111-1111111111111
And here is a sample of the file that we are import using the BAT:
123456,"Plaintiff v. Defendant"
I created this format file:
8.0
4
1 SQLUNIQUEID 1 16 "" 1 pkid ""
2 SQLCHAR 0 16 "" 2 Code SQL_Latin1_General_CP1_CI_AS
3 SQLCHAR 0 50 "" 3 Description SQL_Latin1_General_CP1_CI_AS
4 SQLUNIQUEID 1 16 "" 4 msrepl_tran_version ""
I did some reading and if I understood correctly I need to do the import using the format file above, but I need to map the import so it only imports into the two columns I need, so I edited the file:
8.0
4
1 SQLCHAR 0 16 "" 2 Code SQL_Latin1_General_CP1_CI_AS
2 SQLCHAR 0 50 "" 3 Description SQL_Latin1_General_CP1_CI_AS
I'm a sql newbie so I just want to know if this will work and if the import does work will sql automatically generate the first two columns (SQLUNIQUEID) during the import. Also after the import do I need to do anything like restart the SQL service. Any help you guys can give me will be appreciated.
I have a question that I hope that you all can help me answer. I have a customer that is using Cisco Call manager to import Client Matter Codes into his call manager. To import the CMCs, he uses the Bulk Administration tool or BAT to import them via a .csv file. What he wants to do is automate the import. Well, Cisco doesn't currently have a way to automate this import so I had the thought that maybe we could import the text directly into the CMCs table in the SQL database. I did a little research and found out that SQL has an import/export tool call bcp. I used bcp to export the table and here's an example of one line in the table:
1111111111111-1111111111-1111111111111 123456 Plaintiff vs. Defendant 111111111-1111-1111-11111-1111111111111
And here is a sample of the file that we are import using the BAT:
123456,"Plaintiff v. Defendant"
I created this format file:
8.0
4
1 SQLUNIQUEID 1 16 "" 1 pkid ""
2 SQLCHAR 0 16 "" 2 Code SQL_Latin1_General_CP1_CI_AS
3 SQLCHAR 0 50 "" 3 Description SQL_Latin1_General_CP1_CI_AS
4 SQLUNIQUEID 1 16 "" 4 msrepl_tran_version ""
I did some reading and if I understood correctly I need to do the import using the format file above, but I need to map the import so it only imports into the two columns I need, so I edited the file:
8.0
4
1 SQLCHAR 0 16 "" 2 Code SQL_Latin1_General_CP1_CI_AS
2 SQLCHAR 0 50 "" 3 Description SQL_Latin1_General_CP1_CI_AS
I'm a sql newbie so I just want to know if this will work and if the import does work will sql automatically generate the first two columns (SQLUNIQUEID) during the import. Also after the import do I need to do anything like restart the SQL service. Any help you guys can give me will be appreciated.