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

Incorrect layout of INSERT and UPDATE in StoredProc?

Hello,

we have set the layout to get the following for SELECT statements:
SELECT
    @newUserFullName = dbo.fnFormatName(Firstname, Lastname, Title),
    @newUserUserName = UserName
  from
    [User]
  Where
    ID_User = @ToUserID 

This works ok.
But with the same settings, we get the following format for INSERT and UPDATE (which is - IMHO - incorrect):
INSERT  INTO Table
          (
            ID_Customer,
            ID_User,
            ID_CustomerAddress,
            ID_Office,
            ID_BusinessUnit,
            ValidFrom,
            IsDefault,
            IsInvoiceAccountManager
          )
          SELECT
            ID_Customer,
            @ToUserID,
            ID_CustomerAddress,
            ID_Office,
            ID_BusinessUnit,
            DateAdd(d, 1, @ChangeDate),
            IsDefault,
            IsInvoiceAccountManager
          FROM
            CustomerAccountManager
          WHERE
            ID_User = @FromUserID
            AND IsDeleted = 0

There is a blank between INSERT and INTO too much, and
the Columns are not indented 2, but many more spaces.

For Updates, it looks like this:
UPDATE  CustomerAccountManager
  SET     ValidTo = @ChangeDate, IsDefault = 0, IsInvoiceAccountManager = 0
  WHERE
          ID_User = @FromUserID
          AND IsDeleted = 0

Here the newlines are missing.

Anybody else experienced this?
romu_ecosys
0

Comments

1 comment

  • Andras B
    romu_ecosys wrote:
    Hello,

    we have set the layout to get the following for SELECT statements:
    ....
    This works ok.
    But with the same settings, we get the following format for INSERT and UPDATE (which is - IMHO - incorrect):

    ...

    Here the newlines are missing.

    ...

    Hi,
    This is indeed inconsistent, and we will fix it for the release. Many thanks for reporting this.

    Regards,
    Andras
    Andras B
    0

Add comment

Please sign in to leave a comment.