Skip to main content
1-Visitor
August 27, 2018
Solved

How to Create a Stored Procedure from thingworx service

  • August 27, 2018
  • 1 reply
  • 1488 views

I want to create a stored procedure from thingworx service, when I'm run test it throw an error 

"Unable to Invoke Service ListServices on  TestDatabase: Incorrect syntax near 'GO'. "

for example:

USE [SERVICE1]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
 
CREATE PROCEDURE [dbo].[ListServices]
@product_id nvarchar(32)
AS
BEGIN
.........
END
Best answer by supandey

Hi @vxba could you try something like this :

 

Create procedure dbo.demoProc1
@Sno int
AS
SET NOCOUNT ON;
Select * from table1
where sNO = @Sno;

Let me know if there's any issue.

1 reply

supandey5-Regular MemberAnswer
5-Regular Member
August 27, 2018

Hi @vxba could you try something like this :

 

Create procedure dbo.demoProc1
@Sno int
AS
SET NOCOUNT ON;
Select * from table1
where sNO = @Sno;

Let me know if there's any issue.

vxba1-VisitorAuthor
1-Visitor
November 20, 2018

Thank you! It worked for me