ahmed salah

ahmed salah

  • 2k
  • 149
  • 3.5k

How to handle sticks on column country1 and country2 columns ?

May 22 2022 11:55 PM

I work on sql server 2017 i have table data as below

i need to make design for data to be best practise and prevent repeating data

my issue here on column countries1 and countries2 columns have data separated sticks so how to handle that

so are making design for countries table or what

 create table #countriesData
 company int,
 [Year] int,
 rev  int,
 countries1 varchar(500),
 countries2 varchar(500)
 insert into #countriesData(company,[Year],rev,countries1,countries2)
 (12099,2012,121, 'China|Italy|America','Holanda|Saudia|America')

my key is company and year and rev and not repeated

so How to handle sticks on column countries

Answers (5)