I have a table name called Kits in which has 5 columns for Book ISBN.
- So i want to select Row even when at least 1 value of ISBN gets matched with any of the 5 columns(ISBN_BOOK1,ISBN_BOOK2,ISBN_BOOK3,ISBN_BOOK4,ISBN_BOOK5) of table kits meant for Storing ISBN.
- if any one of the ISBN exists then return count.
I have written an sql query for this but I am getting row output only if last value is matching with any row. In my case the value is 7589765432 Here is my sql query:
Select *
from kits k
left
join kits_cstm kc
on k.id = kc.id_c
where '8192933563'
and '8192933567'
and '8192933568'
and '8192933564'
and '7589765432' IN (kc.isbn_book_1_c,kc.isbn_book_2_c,kc.isbn_book_3_c,kc.isbn_book_4_c,kc.isbn_book_5_c)
and kc.city_c = 'BAN'
and kc.kit_for_c = 'SCHL'
and k.deleted = 0
ORDER
BY k.kit_id DESC