I have a view in a SQL Server 2008 db that simply exposes about 20 fields of one table to be consumed via ODBC to a client. When I tried to replicate this view in another database, the client could not consume the data source.
Then I noticed some weirdness. The columns in the view are shown, in SQL Server Management Studio, to be varchar(100), while the columns in the table are defined as nvarchar(100). There are no CAST or CONVERT statements in the view, it is a simple SELECT statement.
Example:
Table -> Columns:
Desc1 (nvarchar(100), null)
View -> SELECT TOP 100 PERCENT Desc1 FROM... Columns:
Desc1 (varchar(100), null)
Any ideas why the columns are defined as varchar in the view instead of nvarchar?