use @DBNAME
begin tran RepGenPersonelAccess
if not exists (SELECT name 	  FROM 	 sysobjects   WHERE  name = N'RepGenSectionAccess' 	  AND 	 type = 'U')
begin 
CREATE TABLE [dbo].[RepGenPersonelAccess](
	[id] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
	[SectionCode] [char](30) COLLATE Arabic_CI_AS NOT NULL,
	[reportId] [int] NOT NULL,
	
) ON [PRIMARY] 
end
 
if @@ERROR > 0 
  rollback tran createMessage
commit 
