---
title: "Olivier Suc, PMP (@oliviergsuc) | Hashnode"
description: "Olivier Suc, PMP (@oliviergsuc) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@oliviergsuc"
---

@oliviergsuc

# Olivier Suc, PMP

@oliviergsuc · Joined April 2022

## Comments

[Bill Liu DECLARE @TSQL varchar(8000), @DATE\_FROM char(19), @DATE\_TO char(19) SELECT @DATE\_FROM = REPLACE('2022-04-28T01:07:35Z', 'T', ' ') SELECT @DATE\_TO = REPLACE('2022-04-30T01:07:35Z', 'T', ' ') SELECT @TSQL = ' SELECT DateTime AS time, K12-1STAT.CPV,K12-2STAT.CPV,K12-3STAT.CPV,K12-4STAT.CPV,K12-5STAT.CPV,K12-6STAT.CPV FROM OPENQUERY( INSQL, '' SELECT DateTime, K12-1STAT.CPV,K12-2STAT.CPV,K12-3STAT.CPV,K12-4STAT.CPV,K12-5STAT.CPV,K12-6STAT.CPV FROM Runtime.dbo.WideHistory WHERE wwResolution = 120000 AND wwRetrievalMode = "Average" AND DateTime >= ''''' + @DATE\_FROM + ''''' AND DateTime <= ''''' + @DATE\_TO + ''''' AND wwTimeZone = ''''UTC'''' ORDER BY DateTime ASC '') ' EXEC (@TSQL) error: " db query error: mssql: Incorrect syntax near '.'. " I dont see the '.'. anywhere](https://hashnode.com/posts/query-and-visualise-aveva-historian-on-grafana-dashboard/6146742ea2b54e17a52c3094/comment/626c6616a2d355d4df43d495#reply-626c8f36b7dcabd258e756a1)

Reply · Article · Apr 30, 2022 · [Query and Visualise AVEVA Historian on Grafana Dashboard](https://hashnode.com/posts/query-and-visualise-aveva-historian-on-grafana-dashboard/6146742ea2b54e17a52c3094)

[Bill, great tutorial. I've managed to get the trend to work but I'm having an issue with the taglist. I get an error after copying your code verbatim (upper right hand corner copy option). I'm using Wonderware 2014 R2 SP1 P2 and Grafana 8.4.5 i'm getting "db query error: mssql: Incorrect syntax near ')'. "](https://hashnode.com/posts/query-and-visualise-aveva-historian-on-grafana-dashboard/6146742ea2b54e17a52c3094/comment/626c6616a2d355d4df43d495)

Comment · Article · Apr 29, 2022 · [Query and Visualise AVEVA Historian on Grafana Dashboard](https://hashnode.com/posts/query-and-visualise-aveva-historian-on-grafana-dashboard/6146742ea2b54e17a52c3094)
