SQL存储过程语法错误,
CREATEPROCEDUREPro_saveST_zzASupdatezzbeginifkmfl='负债类'thenjcye='jf-df'elsejcye='df-j...
CREATE PROCEDURE Pro_saveST_zz
AS
update zz
begin
if
kmfl = '负债类'
then
jcye='jf-df'
else
jcye='df-jf'
end;
GO
总是报错语法错误,请帮帮忙 展开
AS
update zz
begin
if
kmfl = '负债类'
then
jcye='jf-df'
else
jcye='df-jf'
end;
GO
总是报错语法错误,请帮帮忙 展开
3个回答
展开全部
CREATE PROCEDURE Pro_saveST_zz
AS
begin
update zz case when
kmfl = '负债类'
then
jcye='jf-df'
else
jcye='df-jf'
end;
AS
begin
update zz case when
kmfl = '负债类'
then
jcye='jf-df'
else
jcye='df-jf'
end;
更多追问追答
追问
报CASE附近有语法错误
追答
CREATE PROCEDURE Pro_saveST_zz
AS
begin
update zz case when
kmfl = '负债类'
then
set jcye='jf-df'
else
set jcye='df-jf'
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
CREATE PROCEDURE Pro_saveST_zz
AS
begin
update zz
set jcye=(case when kmfl = '负债类' then'jf-df'
else'df-jf' end)
end
AS
begin
update zz
set jcye=(case when kmfl = '负债类' then'jf-df'
else'df-jf' end)
end
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
begin
if....endif
end
if....endif
end
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询