Hi!
I'll test this configuration later today or tomorrow.
Best regards,
Victor
I'll test this configuration later today or tomorrow.
Best regards,
Victor
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
select A.item_id,A.ts,D.idata_value,I.description from
(
select item_id,max(idata_timestamp) as ts from netxms.idata_14 group by item_id
) A
join netxms.idata_14 AS D on A.item_id=D.item_id and D.idata_timestamp = A.ts
join netxms.items AS I on I.item_id = A.item_id
CREATE PROC LastValues
@Id integer
AS
EXEC ('
select A.item_id,A.ts,D.idata_value,I.description from
(
select item_id,max(idata_timestamp) as ts from netxms.idata_' + @Id + ' group by item_id
) A
join netxms.idata_' + @Id + ' AS D on A.item_id=D.item_id and D.idata_timestamp = A.ts
join netxms.items AS I on I.item_id = A.item_id'
)
GO

Поскольку повторить это у себя мне так и не удалось, и особых идей не было...