Modifying the insert, create and delete scripts
Posted: Fri 22 May 2015 08:57
Hi
If I right click on a table, select Generate Scripts and then Insert (or update or delete) I will end up with a script that looks something like this:
I want to create Insert, update and delete procedures for all tables , turn them into stored procedures and then import those into Entity Developer for use in my application. So ideally I would like a set of relevant Parameters at the top of the stamen and have the values line(s) use those parameters. Something like the example below
Is there a way to do this in DB forge at present, if not is it on your roadmap?
Regards
Dom
If I right click on a table, select Generate Scripts and then Insert (or update or delete) I will end up with a script that looks something like this:
Code: Select all
USE FishTrackerProfessional
GO
INSERT INTO Landings.SeaFishLevyRates
(
Description
,LevyRate
,ModifiedDate
)
VALUES
(
N'' -- Description - nvarchar(50)
,0 -- LevyRate - numeric(8, 4)
,GETDATE() -- 'YYYY-MM-DD hh:mm:ss[.nnn]'-- ModifiedDate - datetime
)
GO
Code: Select all
CREATE PROCEDURE Landings.SeaFishLevyRatesInsert
@Description nvarchar(50) = NULL,
@LevyRate numeric(8, 4) = NULL,
@ModifiedDate datetime = NULL
AS
BEGIN
SET NOCOUNT ON
INSERT INTO Landings.SeaFishLevyRates (Description
, LevyRate
, ModifiedDate)
VALUES (@Description,
@LevyRate,
GETDATE());
END
GO
Regards
Dom