且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Sql Server中使用Case语句左连接获取ERROR

更新时间:2023-02-05 18:20:49

第一眼看: CASE WHEN 语句不完整。必须以 END 字结束!在这两种情况下!



看看这里: CASE(SQL) [ ^ ]
On the first look: CASE WHEN statement is incomplete. Must be ended with END word! In both cases!

Have a look here: CASE (SQL)[^]


对于初学者,我怀疑第一个错误是由以下原因引起的:



For starters, I suspect the first error is caused by:

SELECT CASE when mytable='CertUserToAccount' then CertUserToAccount





,如第13行的错误所示。



'SELECT'语句别名为't',但它从哪里选择?



as indicated by Error on line 13.

The 'SELECT' statement is aliased to 't', but where is it selecting anything from?