MS Sql dates in timeseries and view visibility in query builder

hi
first question is
in the query builder is it possible to select a sql view just as as you would with a sql table?

we are trying this because, we are having some issues with Grafana saying “db has no time column: no time column found”
it does have a std sql timestamp column so we are unsure as to why we get this error?

hence the idea was to create a sql view with unixtime equivalent - which we cant see in query builder,
I can write the sql code that returns the data with unixtime in table mode - but still this errors with no time column

any ideas for me?

Mal

Welcome

Please share the query that is causing this error and also the table schema you are querying that has thw timestamp column?

so as a very simple query example

SELECT TOP(50) _VALUE, _TIMESTAMP FROM Kepware.dbo.CHINFONG

table:
CREATE TABLE [dbo].[CHINFONG](
[id] [int] IDENTITY(1,1) NOT NULL,
[_NAME] varchar NULL,
[_NUMERICID] [int] NULL,
[_VALUE] [float] NULL,
[_TIMESTAMP] [datetime] NULL,
[_QUALITY] [int] NULL,

i think i am just rushing this to much without learning :slight_smile:
i need to set alias to time!

so only question, can i use sql views as opposed to tables in query builder?

1 Like

Yes you can but I dont think it works with query builder yet