根据选择的状态更新列信息

时间:2016-09-16 21:16:18

标签: sql sql-server-2008 sql-server-2008-r2

我在sql server 2008中使用此查询来从大数

中选择行数
(select *
from (select *,
             row_number() over (partition by 
                     [Patient Family registration no# رقم الملف] order by ((CONVERT(date,[date of visit] ) ))) as seqnum
      from MFC  
      ) t
where  seqnum = 1)

现在我需要更新列调用(访问类型)为我选择的这些行的“新访问”,我该怎么做? 感谢

1 个答案:

答案 0 :(得分:2)

您可以使用可更新的CTE:

/* variable declarations return undefined */
var req = request({
  "method": "POST",
  url: "http://localhost:8044/aut",
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({secret: "danzellovestodance"})
}, function (error, response, body) {
  if (!error && response.statusCode == 200) {
    console.log("test"); console.log(response.body);
  }
});