これはSQLの私のクエリです:
with cte
as(
select top 1
Id,
(((DATEPART(hour, CAST([Time] AS DATETIME)) * 60) + (DATEPART(minute, CAST([Time] AS DATETIME)) ) )) AS Tim,
Price
from Prices order by [Time] desc
)
,cte1 as(
select
(((DATEPART(hour, CAST([Time] AS DATETIME)) * 60) + (DATEPART(minute, CAST([Time] AS DATETIME)) ) )) as tim1
from M1
)
そして今、私はこれをやりたいです; cte.tim = cte1.tim1の場合、テーブルの行を更新するか、テーブルに挿入しますが、方法がわかりませんか?どうもありがとう