Comments
7 comments
-
Hi @Matthew_Sontum,
Thanks for letting us know.
We've tried to replicate the issue locally but so far we've been unable to.
Would it be possible for you to send us the formatting style (either on the forums or by emailing it to us at sqlpromptteam@red-gate.com) that is throwing up the problem?
Best regards,
Krzysztof -
It won't let me attach it to the forum, so I have sent it to the email address.
-
@Matthew_Sontum Try changing your alias to multiple characters from a single character. This workaround has been working for me.
K -
Hi @Matthew_Sontum ,
Thanks for the style file. However, we still couldn't reproduce the issue.
Can you please upgrade to the latest version if not already and test again? -
It is still an issue with the current version, and you can reproduce it with just the following:
CREATE TABLE dbo.Product (
SupplierID INT,
ProductID SMALLINT,
CategoryId SMALLINT,
DateActive DATETIME,
DateInactive DATETIME,
PackageOnly BIT,
BundleOnly BIT,
PRIMARY KEY (SupplierID, ProductID)
);
GO
DECLARE @SupplierID INT,
@ProductCategoryID SMALLINT,
@LastDate DATETIME,
@ArrivalDateTime DATETIME;
SELECT *
FROM dbo.Product p
WHERE p.SupplierID = @SupplierID
AND p.CategoryId = @ProductCategoryID
AND p.DateActive <= @LastDate
AND p.DateInactive >= @ArrivalDateTime
AND p.PackageOnly = 0
AND (p .BundleOnly IS NULL OR p.BundleOnly = 0); -
-
Hi @Matthew_Sontum
Thanks for the complete script.
If you uncheck 'Indent parentheses contents' , it should work as you expect.
Add comment
Please sign in to leave a comment.
FROM dbo.Product p
WHERE p.CategoryId = @ProductCategoryID
AND p.DateActive <= @LastDate
AND p.DateInactive >= @ArrivalDateTime
AND p.PackageOnly = 0
AND (p .BundleOnly IS NULL OR p.BundleOnly = 0)
I do not want it to do this and I can't find the setting that allows it. Also, as you can see from the example, it does not do it consistently.