Jeff-Lewis / codesmith

Automatically exported from code.google.com/p/codesmith
0 stars 0 forks source link

Date type not correct for column sysname(nvarchar(128)) #96

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate code for a view that contains a column whose type is sysname
(nvarchar(128))
2. The generated code uses sysname as the data type.

What is the expected output? What do you see instead?
Use nvarchar(128), stripping away systype.

What version of the product are you using?
2.1.661

Please provide any additional information below.
Here is the definition of the view:
CREATE view [dbo].[vwRowCount] (
   [TableName],
   [RowCount]
  )
as
  select  o.name,
          i.rowcnt
  from    sys.all_objects o
  inner join sys.schemas as s on s.schema_id = o.schema_id
  inner join dbo.sysindexes i on i.id = o.object_id
  where   (i.indid <= 1
           or i.indid = 255
          )
          and (o.type = 'U')
          and s.name = 'dbo'

Note: o.name is of type sysname(nvarchar(128))

Original issue reported on code.google.com by m.harttu...@gmail.com on 18 Apr 2009 at 11:12

GoogleCodeExporter commented 9 years ago

Original comment by shannon....@gmail.com on 21 Apr 2009 at 3:52

GoogleCodeExporter commented 9 years ago

Original comment by shannon....@gmail.com on 21 Apr 2009 at 4:11

GoogleCodeExporter commented 9 years ago
This is a CodeSmith error and has been fixed in CodeSmith 5.1.  This fix missed 
the
beta release, but will be included in a future release.

Original comment by paul.wel...@gmail.com on 21 Apr 2009 at 9:19