title: Is there a way to do this, Not to repeat?
body: <p>I handle projects by code  <strong>(PROYECT_A A00001)</strong></p>
  
  <p>There are 3 tables <strong>(SEGMENT SE00001,LABLE LA00001,STRONG ST00001)</strong> that relate to a project, there may be repeated codes from these tables but they belong only to a project</p>
  
  <p><strong>Is there any way to not repeat the fields?</strong></p>
  
  <pre><code>CREATE TABLE [dbo].[PROYECT_A](
      [PROYECT_A] [int] IDENTITY(1,1) NOT NULL,
      [CODE_A]  AS ('A'+right('00000'+CONVERT([varchar],[PROYECT_A],(0)),(5))),
      [STATUS] [datetime] NOT NULL,
      [CREATION_DATE] [datetime] NOT NULL,
   CONSTRAINT [PK_RR] PRIMARY KEY CLUSTERED 
  (
      [CODE_A] ASC
  )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
  ) ON [PRIMARY]
  END
  GO
  
  CREATE TABLE [dbo].[SEGMENT](
      [ID_SEGMENT] [int] IDENTITY(1,1) NOT NULL,
      [CODE_SE]  AS ('SE'+right('00000'+CONVERT([varchar],[ID_SEGMENT],(0)),(5))),
      [NAME] [varchar](20),
      [POWW] [varchar](20),
      [SQWE] [varchar](20),
      [DATESTART] [datetime] NOT NULL,
      [DATESTART] [datetime] NOT NULL
      [CODE_A] [varchar](20)
  GO
  
  
  CREATE TABLE [dbo].[LABLE](
      [ID_LABLE] [int] IDENTITY(1,1) NOT NULL,
      [CODE_LA]  AS ('LA'+right('00000'+CONVERT([varchar],[ID_LABLE],(0)),(5))),
      [NAME] [varchar](20),
      [POWW] [varchar](20),
      [SQWE] [varchar](20),
      [DATESTART] [datetime] NOT NULL,
      [DATESTART] [datetime] NOT NULL
      [CODE_A] [varchar](20)
  GO
  
  CREATE TABLE [dbo].[STRONG](
      [ID_STRONG] [int] IDENTITY(1,1) NOT NULL,
      [CODE_ST]  AS ('ST'+right('00000'+CONVERT([varchar],[ID_STRONG],(0)),(5))),
      [NAME] [varchar](20),
      [POWW] [varchar](20),
      [SQWE] [varchar](20),
      [DATESTART] [datetime] NOT NULL,
      [DATESTART] [datetime] NOT NULL
      [CODE_A] [varchar](20)
  GO
  </code></pre>