Friday, February 17, 2012

Data type change in SQL view

I've created a SQL View in SQL 2000 using a table that has columns
defined as Numeric data type. In the view, I am grouping and summing.
When I link the view via ODBC to Access, all of the data types are
changed to text. If I link the original table which the views are
created from to Access, the data types are correct. So this problem
obviously happens when I change the view to Group. Is there a way
around this? I want the data types to be correct in Access when I
link to the views.

thanks,

jimMR71 (mr71@.yahoo.com) writes:
> I've created a SQL View in SQL 2000 using a table that has columns
> defined as Numeric data type. In the view, I am grouping and summing.
> When I link the view via ODBC to Access, all of the data types are
> changed to text. If I link the original table which the views are
> created from to Access, the data types are correct. So this problem
> obviously happens when I change the view to Group. Is there a way
> around this? I want the data types to be correct in Access when I
> link to the views.

Not that I know anything about the Access part of this, but it
could help if you post the CREATE TABLE statements for your tables
and the CREATE VIEW statement.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

No comments:

Post a Comment