Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2010
    Posts
    1

    Unanswered: How to find if the first symbol is even and last is odd

    Have a table Products (maker, model, type)

    I want help to write a query for finding out the models the first symbol of which represents an even digit, and the last one - odd digit.The first symbol should also be less than the last one.

    Model has values like 1232, 1233, 1276, 1298 etc.

    Kindly advice.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >the first symbol of which represents an even digit, and the last one - odd digit.
    Exactly how is first & last measured or determined?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Mar 2007
    Posts
    623
    Quote Originally Posted by rrnaik View Post
    Have a table Products (maker, model, type)

    I want help to write a query for finding out the models the first symbol of which represents an even digit, and the last one - odd digit.The first symbol should also be less than the last one.

    Model has values like 1232, 1233, 1276, 1298 etc.
    What exactly do you mean with "symbol"? If it is the letter in model value, than all your sample values are not matching that conditions as '1' (the first letter) is an odd digit. Otherwise, I am out of ideas.

    Also it would be helpful to post the data types of columns and the result set you expect from given sample values.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •