Michael, just to make sure there is no misunderstanding: your statement should look like
INSERT INTO [dbo].[ProfilePropertyDefinition] (PortalId , ModuleDefID , Deleted , DataType , DefaultValue , PropertyCategory , PropertyName , Length , Required , ValidationExpression , ViewOrder , Visible , CreatedByUserID , CreatedOnDate , LastModifiedByUserID , LastModifiedOnDate , DefaultVisibility , ReadOnly ) SELECT @PortalId , ModuleDefID , Deleted , DataType , DefaultValue , PropertyCategory , PropertyName , Length , Required , ValidationExpression , ViewOrder , Visible , CreatedByUserID , CreatedOnDate , LastModifiedByUserID , LastModifiedOnDate , DefaultVisibility , ReadOnly FROM ----
because otherwise mapping is done on column order, not column names matching local variable name
|