Skip to content

In comparison text values are converted to INT even when they should be converted to BIGINT #352

@madamczak

Description

@madamczak

When we execute following statement:

select count(*) where '4782171445023473664' > 0

we get:
select count() where '4782171445023473664' > 0;
Data conversion error converting "4782171445023473664"; SQL statement:
select count(
) where '4782171445023473664' > 0 [22018-176] 22018/22018

We have to cast 0 to bigint in this statement:
select count(*) where '4782171445023473664' > Cast(0 as BIGINT)
Only then it works fine.

I belive this should be possible without casting 0 to bigint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions