Skip to content

Operand type clash: table is incompatible with nvarchar(max) | Procedure: tSQLt.AssertEqualsTable (0) #208

@tneve-azure

Description

@tneve-azure

I'm new to tSQLt and I am trying to test a simple stored procedure that moves data from one table to another. I have many table columns that are of datatype varchar(max) or nvarchar(max) and when I run my test case it calls a fSQLt.AssertEqualsTable stored procedure and it returns the below error.

I have tried changing the table column datatypes to varchar(255) or nvarchar(255) and I still get the same error below. I am not sure why I'm getting this error even when I change the column datatypes in the tables. Is there any tips or tricks that I can do to get my Assertion to work?

(1 row affected)
[test_stg_USP_PrstgToStg_LP].[test_MoveData] failed: (Error) Message: Operand type clash: table is incompatible with nvarchar(max) | Procedure: tSQLt.AssertEqualsTable (0) | Severity, State: 16, 2 | Number: 206

+----------------------+
|Test Execution Summary|
+----------------------+
|No|Test Case Name |Dur(ms)|Result|
+--+--------------------------------------------------------+-------+------+
|1 |[test_stg_USP_PrstgToStg_LP].[test_MoveData]| 290|Error |

Msg 50000, Level 16, State 10, Line 1

Test Case Summary: 1 test case(s) executed, 0 succeeded, 0 skipped, 0 failed, 1 errored.

Completion time: 2025-03-07T14:38:48.0590870-05:00

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions