I have 2 have tables.
one is masterdatamodel and one is masterdataattr
in masterdatamdoel i have masterdatamodelid and mastertype.
masterdataattr i have field like masterdatamodelid,mastertype,attorder,attname,atttype
i should insert new data for masterdatamodelid.
suppose for masterdatamodelid data is 1
masterdataattr data ismastermodelid =1 attorder=1 attname="test" atttype="test123"
attorder=2 attname="test2" atttype="test1234"
mastermodelid=2 attorder=1 attname="test" attype="test123"
attorder=2 attname="test" attype="test1234"
so i have to give here condition.
ALTER PROCEDURE CORE.SP_InsertMasterModelATTR
(
@MasterModelId int
,@AttributeOrder int
,@AttributeName char(50)
,@AttributeType char(10)
,@MasterType char(50)
,@Required char(1)
,@ValueUsedAsKey char(1)
,@DefaultValue char(100)
)
AS
BEGIN
SET NOCOUNT ON;
Insert INTO CORE.MasterModelAttr
(
AttributeOrder
,AttributeName
,AttributeType
,MasterType
,Required
,ValueUsedAsKey
,DefaultValue
)
values(
@AttributeOrder
,@AttributeName
,@AttributeType
,@MasterType
,@Required
,@ValueUsedAsKey
,@DefaultValue )
Iam trying to write condition its not working.can anyone please help on this.