Jump to content

Face

New Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Face's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I've got a column (serialcat) in table (serial) which contains a combination of characters - axzyodu. These characters could be in any order for each row. What I want to do is to display all rows that contain 'o' or 'd' but not 'y' in the serialcat column. So I'd expect back examples of : axdo xuod zoda oax xdu etc..... Any help appreciated. Thanks.
  2. Ok, just figured it out.... Use OR instead of AND : SELECT distinct(LEFT(serial,2)) as serial FROM aircraft where serial like 'W%' or serial like 'X%' or serial like 'Y%'
  3. I've got a table with about 25,000 rows. I was selecting on the serial field using the following : SELECT distinct(LEFT(serial,2)) as serial FROM aircraft This would return the distinct first two characters of the serial. What I'd now like to do is to just select serials that begin with X, W, and Y. But trying SELECT distinct(LEFT(serial,2)) as serial FROM aircraft where serial like ('W%','X%','Z%') or trying SELECT distinct(LEFT(serial,2)) as serial FROM aircraft where serial like 'W%' and serial like 'X%' and serial like 'Y%' don't work. Does anyone have a solution ? Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.