博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
级连查询与更新
阅读量:7063 次
发布时间:2019-06-28

本文共 566 字,大约阅读时间需要 1 分钟。

select DATEADD(day,v.LearningDay,sc.OrderTime) AS OrderPayDate, sc.LearninTime,v.VideoTitle,sc.OrderTime,v.LearningDay from

ShoppingCart sc
left join video v
on sc.MatterId=v.Id
where sc.OrderTime is not null

update sc
set sc.LearninTime = r.OrderPayDate
from ShoppingCart sc,
(select sc.Id, DATEADD(day,v.LearningDay,sc.OrderTime) AS OrderPayDate, sc.LearninTime,v.VideoTitle,sc.OrderTime,v.LearningDay from
ShoppingCart sc
left join video v
on sc.MatterId=v.Id
where sc.OrderTime is not null
) as r
where sc.Id=r.Id

转载于:https://www.cnblogs.com/ushou/p/3439877.html

你可能感兴趣的文章
zw版【转发·台湾nvp系列Delphi例程】HALCON SetLineStyle1
查看>>
Bzoj4710 [Jsoi2011]分特产
查看>>
pat甲级题目1001 A+B Format详解
查看>>
电话拨号示例
查看>>
day12-迭代器
查看>>
HTML5 <script>元素async,defer异步加载
查看>>
poj2299--归并排序求解逆序对
查看>>
About Common Crypto
查看>>
c/c++关键字分类:
查看>>
二十六、MySQL 临时表
查看>>
haskell基本语法
查看>>
windbg*****************************TBD
查看>>
PHP 邮箱操作的Action
查看>>
UVA Rails(stl-stack)
查看>>
Leetcode名企之路
查看>>
JAVA 8 Streams
查看>>
weka安装
查看>>
设计模式(十一)享元模式
查看>>
解决开启服务器防火墙导致ftp不能连接的问题
查看>>
程序员网站
查看>>