Stored Procedures [dbo].[AL_AUTHORITATIVE_SET]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnNo
Parameters
NameData TypeMax Length (Bytes)
@authoritative_valueint4
@tablenamevarchar(max)max
@field1namevarchar(max)max
@field1valuevarchar(max)max
@field2namevarchar(max)max
@field2valuevarchar(max)max
@fieldcountint4
SQL Script
SET QUOTED_IDENTIFIER OFF
GO
CREATE PROCEDURE [dbo].[AL_AUTHORITATIVE_SET]      @authoritative_value int,    @tablename varchar(max),    @field1name varchar(max),    @field1value varchar(max),    @field2name varchar(max),    @field2value varchar(max),    @fieldcount int AS         /*
  
    *   Generated by SQL Server Migration Assistant for Oracle.    *   Contact ora2sql@microsoft.com or visit http://www.microsoft.com/sql/migration for more information.    */
    BEGIN        IF @fieldcount = 1          /*           *   SSMA error messag
  
es:          *   O2SS0013: EXECUTE IMMEDIATE statement was converted into EXEC(...) statement, but dynamic string was not converted. It must be converted manually.          *           EXECUTE (             'UPDATE '              +              ISNULL(@ta
  
blename, '')              +              ' SET authoritative = '              +              ISNULL(CAST(@authoritative_value AS nvarchar(max)), '')              +              ' WHERE LOWER('              +              ISNULL(@field1name, '')           
  
   +              ') = LOWER( '''              +              ISNULL(@field1value, '')              +              ''')')          */
    EXECUTE (             'UPDATE '              +              @tablename              +              ' SET authoritative
  
= '
              +              @authoritative_value              +              ' WHERE LOWER('              +              @field1name              +              ') = LOWER( '''              +              @field1value              +              ''')
  
'
)           DECLARE             @db_null_statement int        IF @fieldcount = 2          /*           *   SSMA error messages:          *   O2SS0013: EXECUTE IMMEDIATE statement was converted into EXEC(...) statement, but dynamic string was not converte
  
d. It must be converted manually.          *           EXECUTE (             'UPDATE '              +              ISNULL(@tablename, '')              +              ' SET authoritative = '              +              ISNULL(CAST(@authoritative_value AS n
  
varchar(max)), '')              +              ' WHERE LOWER('              +              ISNULL(@field1name, '')              +              ') = LOWER( '''              +              ISNULL(@field1value, '')              +              ''') AND LOWER(
  
'              +              ISNULL(@field2name, '')              +              ') = LOWER( '''              +              ISNULL(@field2value, '')              +              ''')')          */
    EXECUTE (             'UPDATE '              +        
  
      @tablename              +              ' SET authoritative = '              +              @authoritative_value              +              ' WHERE LOWER('              +              @field1name              +              ') = LOWER( '''          
  
    +              @field1value              +              ''') AND LOWER('              +              @field2name              +              ') = LOWER( '''              +              @field2value              +              ''')')           DECLARE
  
            @db_null_statement$2 int     END
GO
Uses