0
我已經創建在Sybase錯誤的語法不正確
create procedure prcrms_crms_cust_id_verify_ins(@customer_code numeric(12,0),@id_type tinyint,@verification_status varchar(12),@verification_response varchar(255),@verification_date datetime,@add_user varchar(21)) as
begin
declare @check_id_exists int
select @check_id_exists = count(*) from crms_customer_id_verification where (('customer_code'[email protected]_code) and ('id_type'[email protected]_type))
if(@check_id_exists > 0)
begin
update crms_customer_id_verification set [email protected]_status,[email protected]_response,[email protected]_date where (('customer_code'[email protected]_code) and ('id_type'[email protected]_type))
return @@rowcount
end
if((@check_id_exists <> null) or (@check_id_exists <> 0))
begin
insert into crms_customer_id_verification(customer_code,id_type,verification_status,verification_response,verification_date,add_user) values(@customer_code,@id_type,@verification_status,@verification_response,@verification_date,@add_user)
return @@rowcount
end
end
一個過程,當我嘗試執行過程
exec prcrms_crms_cust_id_verify_ins(3344,0,"VERIFIED",'{test:test}','1998-09-09 12:12:12.000','Admin')
這表明附近有語法錯誤 '3344'。
唯一的問題是括號。我不知道爲什麼你需要使用'varchar'(至少從問題和這個答案都不清楚)。 –