Skip to content

ODBC style date literals cause parser failure #443

Open
@aberezin

Description

@aberezin

The following fails
mssql-cli -S somehost -U someuser -Q 'select {d '2050-01-01'}'

However, the SQL statement runs in, for example, DataGrip connected to the same sqlserver using a jdbcdriver. The sqlserver2019 docs indicate it is a valid date literal (described as ODBC API Specific)
https://docs.microsoft.com/en-us/sql/t-sql/data-types/date-transact-sql?view=sql-server-ver15

Simple workaround is not use that syntax for date literals.

| Microsoft SQL Server 2016 (SP2-CU10) (KB4524334) - 13.0.5492.2 (X64) |
| Oct 4 2019 19:14:08 |
| Copyright (c) Microsoft Corporation |
| Standard Edition (64-bit) on Windows Server 2016 Datacenter 10.0 (Build 14393: ) (Hypervisor)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: non-interactiveTasks related to non-interactive supportbugtriage neededIssues or enhancements needing to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions