• Hi,

    Thanks for your reply. I am fully agree with you that this is purely design flaw and since he can not do any changes in the table, so it looks like impossible, but what if I says :

    alter table books add book_cat int

    and then:

    update books set book_cat=1 where code like 'N%'

    update books set book_cat=2 where code like 'O%'

    update books set book_cat=3 where code like 'J%'

    update books set book_cat=4 where code like 'P%'

    i.e. if his client allows to make change in the table then what will be SQL then ? Moreover, otherwise it will give me another good learning of sql.

    Regards

    Girish Sharma