Question Louie McLaughlin · Mar 6, 2023 Create Stored procedure with multiple sql statements I need a stored procedure where I can execute multiple delete from statements. This will work to create a stored procedure, but when I add in other delete from, get error invalid sql statements when try to create CREATE PROCEDURE DeleteSpecimenTwo (IN Specno VARCHAR(50))BEGINDELETE FROM PCONT WHERE PSPECNO = :Specno;END; This doesn't work CREATE PROCEDURE DeleteSpecimenTwo (IN Specno VARCHAR(50))BEGINDELETE FROM PCONT WHERE PSPECNO = :Specno; DELETE FROM PSPEC WHERE PSPECNO = :Specno;END; #SQL #Caché 0 1 0 272
Question Louie McLaughlin · Mar 10, 2022 Passing sql in as text to a command to execute .net I'm new to cache, come from an oracle and sql server background. In oracle and sql server I could write basically a stored procedure like script and pass it in as text to the command to execute. Example: Below would be the _sqltext DECLARE @Id INT; select id into @Id from something; if @Id = 9 BEGIN do something END The _sqltext would work in sql server, what would be the equivalent for cache for it work? I get a generic error when I try it with cache #.NET #SQL #Caché 0 2 0 253