Error laying out SQL
torsten.strauss
Posts: 271 Silver 3
in SQL Prompt
Hi Redgate Team,
formatting the following code will cause the error "Error laying out SQL"
The S from Select is highlighted and the error Object reference not set to an instance of an object.
Thanks for fixing this!
Regards
Torsten
formatting the following code will cause the error "Error laying out SQL"
The S from Select is highlighted and the error Object reference not set to an instance of an object.
SELECT cus.CustomerAlternateKey AS CustomerNumber , pro.ProductAlternateKey AS ProductNumber , pro.EnglishProductName AS ProductName , SUM(fisb.OrderQuantity) AS TotalOrderQuantity , SUM(fisb.DiscountAmount) AS TotalDiscountAmount FROM dbo.FactInternetSalesBig AS fisb INNER JOIN DimProduct AS pro ON pro.ProductKey = fisb.ProductKey INNER JOIN DimCustomer AS cus ON cus.CustomerKey = fisb.CustomerKey GROUP BY cus.CustomerAlternateKey, pro.ProductAlternateKey, pro.EnglishProductName OPTION(IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX); GO
Thanks for fixing this!
Regards
Torsten
Tagged:
Answers
It seems to happen on CREATE or ALTER scripts. If I change the above code to a DECLARE statement instead of a CREATE or ALTER PROCEDURE then it formats fine.
Here is part of the log. (Verbose Logging Enabled)
Jürgen
SQL Prompt was unable to complete this operation.
Problem areas have been highlighted.
Errors during parsing the script:
Ln: 1 Col: 1 - Value cannot be null.
Parameter name: token
I now see that this issues has been around for a few days. Is there a fix coming out soon?
Yes, update from today to 9.1.3.4467 has same problem. But there is now a nice popup with the failure.
Btw I opened a support call and this is logged as SP-6865 in their bug tracking system.
Jürgen
Apologies for the issue you are experiencing and thanks for reporting it.
We are currently investigating the problem (which we can reproduce locally) and hope to have a fix out soon. We will let you know as soon as it is available.
Kind regards,
Frederico
Redgate Software
Here is part of the log. (Verbose Logging Enabled)
Jürgen