The World Statistics Day celebration continues here in the Community. We all need reliable data for sound decision making. Do you have a data source that you trust most? Head over to Discussions to tell us about it.
Choose Language Hide Translation Bar
Highlighted
wjalford
Level III

select where contains & !contains

I need to select rows that contain lot number that start with 8 but do not have Lot in them.  Example 81234 should be selected but 82134 - Lot should not be selected.

 

dt1 << Select where ((Contains(dt1, "Lot Number"),"8") & (!Contains(dt1, "Lot Number"),"Lot"));

 

This does not work.  Does anyone know how I can exclude rows that have the word Lot in the cell Lot Number.  The cell is Lot Number an example is 81333 - Lot.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: select where contains & !contains

dt1 << Select where (Contains(:Lot Number,"8") == 1  & Contains(:Lot Number, "Lot" ) == 0 )
Jim

View solution in original post

1 REPLY 1
Highlighted
txnelson
Super User

Re: select where contains & !contains

dt1 << Select where (Contains(:Lot Number,"8") == 1  & Contains(:Lot Number, "Lot" ) == 0 )
Jim

View solution in original post

Article Labels

    There are no labels assigned to this post.