What are the challenges you face when working across database platforms? Take the survey
Options

DEFECT 5.3.0.3: Suggestions stop in UPDATE with SET = UDF()

PDinCAPDinCA Posts: 642 Silver 1
edited April 12, 2012 12:50PM in SQL Prompt Previous Versions
DECLARE @USER TABLE
      ( UserID       int      NOT NULL
      PRIMARY KEY ( UserID )
      )

UPDATE u
   SET term_date   = DBA.dbo.udf_GetFirstMomentOfDay(CURRENT_TIMESTAMP)
     , update_by   = SUSER_SNAME()
     , update_date = CURRENT_TIMESTAMP
  FROM dbo.t_user_ref u
 WHERE u.
This is as far as I got when suggestions from the table ceased. I suggested snippets, but that's all.

I was going to OUTPUT the userID into the TV, so that's why it's shown in the script.

I am definitely "in" the required database via USE <dbname>.

This appears to be a bug...

Assistance, please.
Jesus Christ: Lunatic, liar or Lord?
Decide wisely...

Comments

  • Options
    Is dbo.t_user_ref a synonym? If so, this is probably because the experimental synonym suggestions feature doesn't yet support providing column suggestions for a table/view referenced via a synonym.

    We plan to improve synonym support as we continue to develop the experimental feature, and support for obtaining column information is one of the first improvements on our list.

    Mike
    Development Lead
    Redgate Software
  • Options
    PDinCAPDinCA Posts: 642 Silver 1
    Not a synonym. It's a user table in the database SSMS is set to: USE <dbname>.

    <dbname>.dbo.t_user_ref is the fully qualified table name.

    I'm fully authorized to the instance as a member of sysadmin.

    This happens very frequently.

    Synonym suggestion is OFF and has been since 5.3 was installed - it's of little use to me until columns are supported.
    Jesus Christ: Lunatic, liar or Lord?
    Decide wisely...
  • Options
    Hi PDinCA,

    Thanks for the reply - unfortunately I've not yet been able to reproduce this here.

    If it's okay I'd like to ask for a little more information. Does prompting still work at earlier points in the script - or has it stopped completely? Also, does this happen EVERY time you try this, or is it intermittent behaviour?

    I've logged it as a bug for now, (SP-4378).

    Many thanks for your time helping us track this down, and apologies for any frustration caused!

    James
    James Allison

    Software Engineer - SQL Prompt
    Red Gate Software Ltd.
  • Options
    PDinCAPDinCA Posts: 642 Silver 1
    Hi James,

    Prompting above the UDF still worked.

    I'll re-open the script and attempt to provoke further suggestions.

    Regards,

    Stephen
    Jesus Christ: Lunatic, liar or Lord?
    Decide wisely...
Sign In or Register to comment.