Create View in SQL Server with data types

Giganews Newsgroups
Subject: Create View in SQL Server with data types
Posted by:  cognosqueen (u252…@uwe)
Date: Mon, 14 Aug 2006

I need to create a view of a sql table, but change the data types.  I know
the syntax below is not correct, and can't figure out if it is wrong or if
you just can't do this.  I have only created views before with the same data
type.

CREATE VIEW F0005New(DRKY nchar(3), DRDL01 nchar(30))
INSERT      (SELECT    rtrim(F0005.DRKY), F0005.DRDL01
FROM        F0005 AS F0005
WHERE    DRSY = '41' AND DRRT = 'S1')

Thanks!!

Replies