if not exists (select column_name from INFORMATION_SCHEMA.columns where table_name = '{objectQualifier}tblNaDevEventsUsersSignedUpAddress' and column_name = 'AttendedEvent')
 begin
   alter table {databaseOwner}[{objectQualifier}tblNaDevEventsUsersSignedUpAddress] add AttendedEvent bit not null default 0
 end
GO

alter procedure {databaseOwner}[{objectQualifier}usp_nadev_Events_User_Address_Update]
(
 @addressId int,
 @address1 nvarchar(255),
 @address2 nvarchar(255),
 @city nvarchar(255),
 @region nvarchar(255),
 @country nvarchar(255),
 @postcode nvarchar(255),
 @phone nvarchar(255),
 @firstname nvarchar(255),
 @surname nvarchar(255),
 @emailAddress nvarchar(255),
 @companyName nvarchar(255),
 @mobileNumber nvarchar(255),
 @faxNumber nvarchar (255),
 @title nvarchar(50),
 @AttendedEvent bit
)

as

	update {databaseOwner}[{objectQualifier}tblNaDevEventsUsersSignedUpAddress] set address1 =@address1,
																					address2 = @address2,
																					city = @city,
																					region = @region,
																					country = @country,
																					postcode = @postcode,
																					phone =@phone,
																					firstname =@firstname,
																					surname =@surname,
																					emailaddress =@emailaddress,
																					companyname =@companyname,
																					mobilenumber=@mobilenumber,
																					faxnumber =@faxnumber,
																					title = @title,
																					AttendedEvent = @AttendedEvent

																					where addressid =@addressid

return

GO