Activity overview
Latest activity by gerthauan
Check for update does not get me the latest release
Today I updated SQLPrompt on one of my app-servers. The version now says 10.14.21.9884. If I do "Check for updates", it says I have the latest version, even though the release notes says the latest...
Columns do not have data type when created with CASE
@Jon_Kirkwood Hi. I was a bit quick to accept your answer as the solution for the previous question regarding data type not present in temp-tables when created with a CAST. Since I did not hear any...
@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...
@Dan_J So, are you guys looking at this? Could you replicate the bug? / comments
@Dan_J So, are you guys looking at this? Could you replicate the bug?
Hi @Dan_J . I have been digging a bit more into this, and it seems to me that if the column was created from a cast of the original value, the data type will disappear in the SQLPRompt create script. Here is an example: SELECT CAST(id AS varchar(10)) AS ID, bffs.ServerName, bffs.DatabaseID, CAST(DatabaseId AS varchar(6)) AS DatabaseIDConverted, bffs.TypeDesc INTO #TempTableName from dbo.BlitzFirst_FileStats bffs
SELECT * FROM #TempTableName ttn If i now hove over the #TempTableName and click the "tooltip", the following create statement is made: CREATE TABLE [#TempTableName]
(
[ID],
[ServerName] NVARCHAR(128),
[DatabaseID] INT NOT NULL,
[DatabaseIDConverted],
[TypeDesc] NVARCHAR(60)
) As you can see, the two columns that was created using a CAST, is missing the data type.
/ comments
Hi @Dan_J . I have been digging a bit more into this, and it seems to me that if the column was created from a cast of the original value, the data type will disappear in the SQLPRompt create scrip...
Why does the Create script for a temp-table not show datatype for all columns?
If I am in a session in SSMS where I have created a temp-table using a select into query, then when I hower over this temp-table-name in the query after, and click on it to show the create script, ...
Yeah, I was aware of that. Was just hoping that SQLPrompt would be able to format some stuff before parsing it. I sometimes get queries in one long line of code that would be nice to be able to format. Thanks anyway. / comments
Yeah, I was aware of that. Was just hoping that SQLPrompt would be able to format some stuff before parsing it. I sometimes get queries in one long line of code that would be nice to be able to for...
BUG: Formating queries fails if GO statement is not on a line of its own
HiIt seems that the formatting fails when there is a GO statement on the same line as another query. I get an error trying to format the following query:SELECT * FROM Felles.DimAlder da; GO I am on...
Victoria W said:
Hi all I'm pleased to report that we've fixed this bug in the latest version of SQL Search:
https://download.red-gate.com/checkforupdates/SQLSearch/SQLSearch_3.6.2.3390.exe
@Victoria W I have just downloaded the latest version from your site, 3.6.3.3612. In SSMS 19.1 there is still an issue with SSMS shutting down when clicking the SQL Search-button. Also, when I tried to install the above version, I got a message sayiing that there was already a newer version installed on the system. I had to uninstall and then install this version in order to be able to see the SQL Search button in SSMS 19.1 at all. What version should I install in order for SQL Search to work in both SSMS 18 and 19.1? / comments
Victoria W said:
Hi allI'm pleased to report that we've fixed this bug in the latest version of SQL Search:
https://download.red-gate.com/checkforupdates/SQLSearch/SQLSearch_3.6.2.3390.exe
@...