tak til alle, der prøver at hjælpe mig... Jeg har løsningen
-
første trigger på
tbl_option
go Create TRIGGER insertProfileToOption ON dbo.tbl_options AFTER INSERT AS insert into tbl_profileOption (profileOption_profileId, profileOption_optoinId) (select tbl_profiles.profile_id, @@IDENTITY from tbl_profiles)
-
anden trigger på
tbl_profile
go Create TRIGGER insertOptionToProfile ON dbo.tbl_profiles AFTER INSERT AS insert into tbl_profileOption (profileOption_profileId, profileOption_optoinId) (select @@IDENTITY, tbl_options.option_id from tbl_options)
hvis der er en anden løsning, vil det være godt, tak