How can we help you today? How can we help you today?

Apply Casing Options error combining FOR SYSTEM_TIME with HAVING

I've been experiencing a recurring error with SQL Prompt and a specific query.  After trying to strip out all the bits and pieces, I've been able to isolate the behavior to a situation that has two queries, both of which contain FOR SYSTEM_TIME ALL specification and the HAVING clause.

If I take out either the HAVING or FOR SYSTEM_TIME ALL specification, formatting is able to successfully apply casing options.  But, if I leave the query as-is, formatting fails to apply casing options.

SELECT *
FROM TableA
    FOR SYSTEM_TIME ALL a
HAVING COUNT(*) >1

SELECT *
FROM TableB FOR SYSTEM_TIME ALL b
HAVING COUNT(*) >1

a.higgins
0

Comments

6 comments

  • Tianjiao_Li
    @a.higgins

    I can't reproduce the issue with version 9.4.3.7121 and default format style.

    Can you upgrade and test again?
    Tianjiao_Li
    0
  • a.higgins
    @Tianjiao_Li, thanks for your help.

    I am on version 9.4.3.7121.  I do have a custom format style, but I get the same error when I use the Default format style: were you testing it with both statements?





    a.higgins
    0
  • a.higgins
    Clarifying note, the error happens when I try to format a script that contains both of the above queries, when both queries contain a HAVING and FOR SYSTEM_TIME.
    a.higgins
    0
  • a.higgins
    Clarifying note, the error happens when I try to format a script that contains both of the above queries, when both queries contain a HAVING and FOR SYSTEM_TIME.
    a.higgins
    0
  • Tianjiao_Li
    Hi @a.higgins

    Thanks for clarifying it! I've reproduced and logged as SP-7364 in our internal bug tracking system. 

    Sorry for the inconvenience caused and please keep an eye on the release note!
    Tianjiao_Li
    0
  • Tianjiao_Li
    @a.higgins

    The fix has gone out in 9.4.8.7733. Please upgrade!
    Tianjiao_Li
    0

Add comment

Please sign in to leave a comment.