You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 19, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 19, 2024. It is now read-only.
I have a procedure.
When I create it, will throw a error:
CREATE PROCEDURE AddTrade
@buyerId nvarchar(50),
@platform INT,
@mobile varchar(20),
@telephone varchar(20),
@orderId varchar(50),
@fullname nvarchar(20)
ASBEGIN
if not exists(select1from [Account] where id=@buyerId)
beginINSERT INTO [Account](id) VALUES(@buyerId)
end
if not exists(select1from [Mobile] where id=@mobile)
beginINSERT INTO [Mobile](id) VALUES(@mobile)
end
if @telephone <> @mobile and not exists(select1from [Mobile] where id=@telephone)
beginINSERT INTO [Mobile](id) VALUES(@telephone)
end
if not exists(select1from [Trade] where orderId=@orderId)
beginINSERT INTO [Trade](orderId,[platform],fullname) VALUES(@orderId,@platform,@fullname)
end
INSERT EDGE INTO Account.HasTradeSELECT a,t FROM Account a , Trade t
WHEREa.id= @buyerId ANDt.orderId= @orderId ;
INSERT EDGE INTO Account.UseMobileSELECT a,t FROM Account a , Mobile t
WHEREa.id= @buyerId ANDt.id= @mobile ;
INSERT EDGE INTO Mobile.HasTradeSELECT a,t FROM Mobile a , Trade t
WHEREa.id= @mobile ANDt.orderId= @orderId ;
INSERT EDGE INTO Mobile.HasAccountSELECT a,t FROM Mobile a , Account t
WHEREa.id= @mobile ANDt.id= @buyerId ;
INSERT EDGE INTO Trade.UseAccountSELECT t,a FROM Account a , Trade t
WHEREa.id= @buyerId ANDt.orderId= @orderId ;
INSERT EDGE INTO Trade.UseSecMobileSELECT t,a FROM Mobile a , Trade t
WHEREa.id= @telephone ANDt.orderId= @orderId ;
INSERT EDGE INTO Trade.UseMainMobileSELECT t,a FROM Mobile a , Trade t
WHEREa.id= @mobile ANDt.orderId= @orderId ;
if not (@telephone=@mobile) -- the same as @telephone<>@mobilebegin
INSERT EDGE INTO Account.UseMobileSELECT a,t FROM Account a , Mobile t
WHEREa.id= @buyerId ANDt.id= @telephone ;
INSERT EDGE INTO Mobile.HasTradeSELECT a,t FROM Mobile a , Trade t
WHEREa.id= @telephone ANDt.orderId= @orderId ;
INSERT EDGE INTO Mobile.HasAccountSELECT a,t FROM Mobile a , Account t
WHEREa.id= @telephone ANDt.id= @buyerId ;
end
END"
And the if block diff position in code ,the error is different.
I resolve this by the code:
if (@telephone=@mobile)
begin
return
end
INSERT EDGE INTO Account.UseMobileSELECT a,t FROM Account a , Mobile t
WHEREa.id= @buyerId ANDt.id= @telephone ;
INSERT EDGE INTO Mobile.HasTradeSELECT a,t FROM Mobile a , Trade t
WHEREa.id= @telephone ANDt.orderId= @orderId ;
INSERT EDGE INTO Mobile.HasAccountSELECT a,t FROM Mobile a , Account t
WHEREa.id= @telephone ANDt.id= @buyerId ;
Thanks for posting the issue. Could you please post the exception message(s) you received?
Or even better, is it possible to share your graph schema, by including the CREAET TABLE statements that specify the graph structure? Without this info, we had a little difficulty in identifying the problem.
Activity
liangjeffchen commentedon Mar 31, 2016
Hi chsword,
Thanks for posting the issue. Could you please post the exception message(s) you received?
Or even better, is it possible to share your graph schema, by including the CREAET TABLE statements that specify the graph structure? Without this info, we had a little difficulty in identifying the problem.
chsword commentedon Mar 31, 2016
文件 error case.cs 是发生错误的用例
pass case.cs 是可以通过的用例
错误提示会提示 “x表不存在y EDGE”,实际上也真实不存在
case.zip
liangjeffchen commentedon Apr 7, 2016
Hi chsword, we've identified and fixed the issue. You can find the latest fix in the master branch. thanks for helping us improve.