Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mail Merge using SQL Server 2005
Hello all.
I am using SQL server 2005 and Word 2000. Previously, I have used Access 2000 to create a query to merge names and addresses on a Word 200 document. No porblems. It is a simple query..."Select ID, Forename, Surname, Address1...etc" I am now using SQL Server 2005, and I want to Mail Merge the same addresses etc. I set up the query, no problem. I select my datasource (SQL Server database), no problems, I select the fields, no problems, I run the merge...no data, just blank lines for nvarchar fields, and strange numbers for integer fields. Obviously something is wrong. I re-run the same query from Access 2000, Mail Merge, no problems. Any suggestions? I ahve tried this Merge now about 10 times, same result. Thank you for any help that you may offer. Regards David |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mail Merge using SQL Server 2005
The problem is that Word 2000 can only se ODBC to connect to SQL Server, and
ODBC does not pass the Unicode data in your NVARCHAR fields along. FWIW later versions of Word can use OLE DB which does that properly, but for the moment you either have to: a. change your NVARCHAR fiels to VARCHAR fields (which means you may lose data if you are actuall using the Unicode features provided by NVARCHAR) or b. create a SQL Server View that converts each NVARCHAR field into a VARCHAR field (there are SQL Server Transact-SQL functions called CAST and CONVERT that do that - you probably need CONVERT). Again, you will lose data, but only when you are doing your merge. Peter Jamieson On 01/10/2008 13:43, in article , "David Clifford" someone@microso wrote: Hello all. I am using SQL server 2005 and Word 2000. Previously, I have used Access 2000 to create a query to merge names and addresses on a Word 200 document. No porblems. It is a simple query..."Select ID, Forename, Surname, Address1...etc" I am now using SQL Server 2005, and I want to Mail Merge the same addresses etc. I set up the query, no problem. I select my datasource (SQL Server database), no problems, I select the fields, no problems, I run the merge...no data, just blank lines for nvarchar fields, and strange numbers for integer fields. Obviously something is wrong. I re-run the same query from Access 2000, Mail Merge, no problems. Any suggestions? I ahve tried this Merge now about 10 times, same result. Thank you for any help that you may offer. Regards David |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mail Merge using SQL Server 2005
Thank you very much Peter, that was a vey concise and helpful answer. I
think that I will play with the Convert function and see what happens. Thanks for your time and help. Regards David "Peter Jamieson" wrote in message ... The problem is that Word 2000 can only se ODBC to connect to SQL Server, and ODBC does not pass the Unicode data in your NVARCHAR fields along. FWIW later versions of Word can use OLE DB which does that properly, but for the moment you either have to: a. change your NVARCHAR fiels to VARCHAR fields (which means you may lose data if you are actuall using the Unicode features provided by NVARCHAR) or b. create a SQL Server View that converts each NVARCHAR field into a VARCHAR field (there are SQL Server Transact-SQL functions called CAST and CONVERT that do that - you probably need CONVERT). Again, you will lose data, but only when you are doing your merge. Peter Jamieson On 01/10/2008 13:43, in article , "David Clifford" someone@microso wrote: Hello all. I am using SQL server 2005 and Word 2000. Previously, I have used Access 2000 to create a query to merge names and addresses on a Word 200 document. No porblems. It is a simple query..."Select ID, Forename, Surname, Address1...etc" I am now using SQL Server 2005, and I want to Mail Merge the same addresses etc. I set up the query, no problem. I select my datasource (SQL Server database), no problems, I select the fields, no problems, I run the merge...no data, just blank lines for nvarchar fields, and strange numbers for integer fields. Obviously something is wrong. I re-run the same query from Access 2000, Merge, no problems. Any suggestions? I ahve tried this Merge now about 10 times, same result. Thank you for any help that you may offer. Regards David |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Tablet PC 2005 SP3 and Word 2007 Mail Merge | Mailmerge | |||
Mail merge with Word 2003 and SQL 2005 on a date and time field. | Mailmerge | |||
Mail Merge using Lotus Notes Mail Server | Mailmerge | |||
Mail Merge with SQL Server | Microsoft Word Help | |||
mail merge documents moved from one server to another server don't | Mailmerge |