Bug / AS
torsten.strauss
Posts: 271 Silver 3
in SQL Prompt
Hi Team,
; WITH
duplicates_cte AS
(
SELECT
*
, HASHBYTES (
'MD5'
, CONCAT (
TRIM ('_.|' FROM requestId)
, eventTime
)
) AS hashId
FROM sys.objects
)
SELECT * FROM duplicates_cte;
SQL Prompt will add an AS before evenTime and the code becomes invalid.
Thanks for fixing!
Torsten
MVP
SQL Prompt will add an AS before evenTime and the code becomes invalid.
Thanks for fixing!
Torsten
MVP
Tagged:
Answers
Thanks for reaching out to us regarding this!
So far I've not been able to reproduce this. I have your Style file from when you have previously provided it and applied it to the code example you have given but there is no AS added before eventTime.
Would you mind providing a screenshot showing how this looks from your side? Also, are you using your 'My Style' style file when formatting this code?
Dan Jary | Redgate Software
Have you visited our Help Center?
Yes, I am using the style sheet attached in one of my latest threads. I attached the screenshots and hope this helps you to resolve the issue.
Thanks!
Thanks for the additional information regarding this.
For some reason I still cannot replicate this behavior. I have the AS keyword style option enabled and your Style file selected as my active style. When I 'Format SQL' is formats the code as follows and does not input AS before eventTime:
My apology for this, is there anything I'm missing here?
Dan Jary | Redgate Software
Have you visited our Help Center?
If you like we can have a teams session, or I can send you additional log files (if any).
I have experienced this and other bugs when working with Synapse.
in this case it is a SQL Database not Synapse but I guess it is the same root cause ...
My apology for the delay in coming back to you on this.
I have tried to reproduce this again but still do not see the same behaviour you and @PerSare seeing. After checking with our team here, we do not currently support Synapse, however that isn't applicable for @torsten.strauss.
I'd be happy to arrange a screen share session, however I am due to be out of the office next week. Do you have any availability on the 8th June to discuss this? Also, what time zone are you located in?
Dan Jary | Redgate Software
Have you visited our Help Center?
I am sure we will find time for a short session on June 8!
Enjoy your week off!
My sincere apology, I hadn't appreciated how busy I was going to be following my return to work! Do you mind if I schedule something in for us to speak on Friday 10th instead? Also, what time zone are you located in?
Dan Jary | Redgate Software
Have you visited our Help Center?
Sorry but I had to deliver a session at SQL Start 2022 last Friday but I have some time this week...
No problem at all, I hope the session went well! I'm sorry that I'm also only just getting back to you!
Are you free tomorrow (Friday) morning at 11am BST?
Dan Jary | Redgate Software
Have you visited our Help Center?
this Friday I am free at 11am BST.
Thanks for coming back to me on this.
Sure, Friday at 11am BST will work for me. I'll book that in now and send over the meeting details.
Dan Jary | Redgate Software
Have you visited our Help Center?