lundi 31 août 2015

How to append to list?

I have a table 's' containing strings:

  1. 'STRING_A'
  2. 'STRING_B'
  3. 'STRING_C'
  4. 'STRING_D'
  5. 'STRING_E'

and a list of strings that i want to insert into 's':

  1. 'STRING_C'
  2. 'STRING_D'
  3. 'STRING_E'
  4. 'STRING_B'
  5. 'STRING_A'

I want to insert only those items that do not overlap with records in the table 's'.

Result table 's':

  1. 'STRING_A'
  2. 'STRING_B'
  3. 'STRING_C'
  4. 'STRING_D'
  5. 'STRING_E'
  6. 'STRING_B'
  7. 'STRING_A'

Can it be done without leaving sql?

Aucun commentaire:

Enregistrer un commentaire