How to show multiple values in my column of my join query ?

  • Hi Friends,

    Hi Friends ,

    in my table i ve the column of item code which contains '1000' ,'2000' ,'3000' series i jus wanna display the output of item codes '1000','2000'series and some of ('3000019','3000020','3000077','3000078').

    i tried in my join query

    these code left(itemcode,4) in ('1000','2000') or itemcode in ('3000019','3000020','3000077','3000078')

    its taking so much of time how t o solve ?

  • Lots of information missing from your post. See the first article linked in my signature line for posting guidelines.

    One of your predicates is not SARGable:

    left(itemcode,4) in ('1000','2000') or itemcode in ('3000019','3000020','3000077','3000078')

    try changing it to this:

    itemcode LIKE '1000%'

    OR itemcode LIKE '2000%'

    OR itemcode in ('3000019','3000020','3000077','3000078')

    -- Gianluca Sartori

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply