How can we help you today? How can we help you today?
gerthauan
@Jon_Kirkwood Hi. I was a bit quick to accept your answer as the solution. Allthough the problem with the cast-columns has been fixed, there is still a problem if the column was created with a CASE-statement. If I use the same example again: DROP TABLE IF EXISTS #TempTableName; SELECT  CAST(bffs.ID AS varchar(10))                                AS ID       , bffs.ServerName       , bffs.DatabaseID       , CAST(bffs.DatabaseID AS varchar(6))                         AS DatabaseIDConverted       , bffs.TypeDesc       , CASE WHEN bffs.TypeDesc = 'ROWS' THEN 'ROWS' ELSE 'LOG' END AS TypeDescWithCast INTO    #TempTableName FROM    dbo.BlitzFirst_FileStats bffs; SELECT  * FROM  #TempTableName ttn; If I hover over the #TempTableName and collect the create table script that SQLPrompt is suggestion, it turns out like this: CREATE TABLE [#TempTableName] ( [ID] VARCHAR(10), [ServerName] NVARCHAR(128), [DatabaseID] INT NOT NULL, [DatabaseIDConverted] VARCHAR(6), [TypeDesc] NVARCHAR(60), [TypeDescWithCast] ) As you can see, the column created with CASE-expression, the one named TypeDescWithCast, has no data type in the create table-script. Could you pass this along to the developers? Thx / comments
@Jon_Kirkwood Hi. I was a bit quick to accept your answer as the solution. Allthough the problem with the cast-columns has been fixed, there is still a problem if the column was created with a CASE...
0 votes