4 Replies Latest reply: Nov 2, 2017 4:19 AM by Supriya R RSS

    Script table with condition

    Supriya R

      i have a table with two language_id

       

      id   ab_id   subject_line            language_id

      1      1       test_mail_english           1

      2      1        test_mail_spanish          2

      3      2        test_mail_english_1       1

      4      2                                               2

      5      3                                               1

      6      4                                               1

      7     4      test_mail_spanish_3         2



      so my output should be


      id   ab_id   subject_line            language_id

      1      1       test_mail_english           1

      3      2        test_mail_english_1       1

      5      3                                               1

      7     4      test_mail_spanish_3         2


      here i want to write a script to get subject_lines, where it first checks for subject_line with language_id = 1, if not empty get subjectline,if it is empty, then only it has to get spanish subject_line i.e  with language_id = 2. How could i do this?