CURRENT_TIMESTAMP inserted incorrectly

Dave PendletonDave Pendleton Posts: 80 Bronze 3
edited December 21, 2007 5:28AM in SQL Prompt Previous Versions
SQL Prompt inserts
CURRENT_TIMESTAMP()

This is incorrect, the function does not allow (or require) the parens.

Comments

  • I've tried to recreate this but SQL Prompt never adds parenthesis when I type -

    SELECT CURRENT_TIMESTAMP

    I've tried this in SQL Prompt 3.6. Which version are you using?
  • I am using version 3.6.0.109.

    I get the parens every time.
  • I don't know why you're experiencing this issue. Could you go into the options > Inserted Candidates > Formatting and untick 'For built-in functions and data types, insert parentheses()'

    Does this make any difference. It doesn't change my version 'not' adding parentheses whether I tick it or not but it's the only option that might affect this.
  • That fixed the problem for CURRENT_TIMESTAMP, but now functions like DB_ID that require parens do not get them.

    [Yes, I know I can type them but then what's the point of the configurable option?]
  • I've been having a play around with my copy of SQL Prompt and I think that I've reproduced your issue. It seems to be down to the option 'Insert default values for parameter data types' under Inserted Candidates > SQL.

    If I tick this and refresh the cache then every time that I type CURRENT_TIMESTAMP SQL Prompt will insert parens. If I then untick this option it will still insert the parens. I need to close down SSMS for this change of option to take effect. This is unwanted behaviour and I'll bring it to the attention of the SQL Prompt developers.

    Let me know if your software exerts the same behaviour.
Sign In or Register to comment.