Azuredatastudio: "AT TIME ZONE" in Query Erroneously Flagged as Incorrect Syntax

Created on 20 Aug 2019  路  5Comments  路  Source: microsoft/azuredatastudio

Issue Type: Bug

"Incorrect syntax near 'AT TIME ZONE'" is erroneously being generated for queries that properly use "AT TIME ZONE".

The following correct example is erroneously flagged as incorrect:

SELECT CONVERT(datetime2, '2019-07-01') AT TIME ZONE 'US Eastern Standard Time';

Azure Data Studio version: Azure Data Studio 1.10.0 (5fdb967ffcea41df0335ec17cfa396a694bb174e, 2019-08-14T18:12:56.165Z)
OS version: Darwin x64 18.7.0


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-3840QM CPU @ 2.80GHz (8 x 2800)|
|GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled|
|Load (avg)|2, 2, 2|
|Memory (System)|16.00GB (0.03GB free)|
|Process Argv||
|Screen Reader|no|
|VM|14%|

Extensions: none

Area - Language Service Bug Done

Most helpful comment

Please see the attached screenshot.

I'm connected to Azure SQL Database...

  • Version: Microsoft SQL Azure (RTM) - 12.0.2000.8 Aug 27 2019 17:56:41 Copyright (C) 2019 Microsoft Corporation
  • Database Compatibility Level: 140

Here's updated information on my version of Azure Data Studio:

Version: 1.11.0
Commit: 460c739a8d90bdbbde39e01abfb8ecdc278ea787
Date: 2019-09-06T17:14:33.682Z
VS Code 1.37.0
Electron: 4.2.9
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 18.7.0

Screen Shot 2019-09-17 at 4 54 54 PM

All 5 comments

@obviousSailfish I don't see an error message from the SQL snippet in the issue using the latest build from master. Are there any additional repro details that may help identify the problem. Maybe the version of SQL you are connecting to?

image

Please see the attached screenshot.

I'm connected to Azure SQL Database...

  • Version: Microsoft SQL Azure (RTM) - 12.0.2000.8 Aug 27 2019 17:56:41 Copyright (C) 2019 Microsoft Corporation
  • Database Compatibility Level: 140

Here's updated information on my version of Azure Data Studio:

Version: 1.11.0
Commit: 460c739a8d90bdbbde39e01abfb8ecdc278ea787
Date: 2019-09-06T17:14:33.682Z
VS Code 1.37.0
Electron: 4.2.9
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 18.7.0

Screen Shot 2019-09-17 at 4 54 54 PM

Same issue affection Visual Studio 2019

Bug still exists on Azure databases
image

Azure Data Studio 1.18.1.

Any progress on this issue? It's been like this for a looooong time now.

@kburtram @Charles-Gagnon

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ungerfall picture Ungerfall  路  3Comments

IObsequious picture IObsequious  路  3Comments

squillace picture squillace  路  3Comments

ottadvantage picture ottadvantage  路  3Comments

stevenreddie picture stevenreddie  路  3Comments