Handling Decimals with operators

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jefferis NoSpamme

    Handling Decimals with operators

    Hi Folks,
    I am trying to make a query that will not return any item larger than 3.000
    in a width field, but I have an item returning with a width of 7.500

    I am wondering if it is a function of a 3 place decimal field.

    Here is the query:
    SELECT *
    FROM `Catalog`
    WHERE `Catalog`.desig ner LIKE 'Victorian' AND `Catalog`.width <3.000
    ORDER BY `Catalog`.sold

    I've tried it with single quotes, but the item still comes up.[color=blue]
    > AND `Catalog`.width <'3.000'[/color]


    What is weird is that the designer field has nothing like Victorian in it,
    but it still pops up.

    Jeff
    ~~~~~~~~~~~~
    Jefferis Peterson, Pres.
    Web Design and Marketing




    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
  • Alvaro G. Vicario

    #2
    Re: Handling Decimals with operators

    *** Jefferis NoSpamme escribió/wrote (Fri, 11 Mar 2005 14:04:26 -0500):[color=blue]
    > SELECT *
    > FROM `Catalog`
    > WHERE `Catalog`.desig ner LIKE 'Victorian' AND `Catalog`.width <3.000
    > ORDER BY `Catalog`.sold[/color]

    You don't even say what DBMS you're using. Assuming it's MySQL, this equals to:

    .... WHERE (`Catalog`.desi gner LIKE ('Victorian' AND `Catalog`.width )) < 3






    --
    -+ Álvaro G. Vicario - Burgos, Spain
    +- http://www.demogracia.com (la web de humor barnizada para la intemperie)
    ++ Manda tus dudas al grupo, no a mi buzón
    -+ Send your questions to the group, not to my mailbox
    --

    Comment

    • Jefferis NoSpamme

      #3
      Re: Handling Decimals with operators

      Thank you!
      Jeff

      Yes,it is MySql. I also found that my page had a partial query not
      completely overwritten, so it was screwing things up badly.



      On 3/11/05 4:15 PM, in article 5u58qlz9j71n.97 2we7mwv9nv$.dlg @40tude.net,
      "Alvaro G. Vicario" <kAlvaroNOSPAMT HANKS@terra.es> wrote:
      [color=blue]
      > *** Jefferis NoSpamme escribió/wrote (Fri, 11 Mar 2005 14:04:26 -0500):[color=green]
      >> SELECT *
      >> FROM `Catalog`
      >> WHERE `Catalog`.desig ner LIKE 'Victorian' AND `Catalog`.width <3.000
      >> ORDER BY `Catalog`.sold[/color]
      >
      > You don't even say what DBMS you're using. Assuming it's MySQL, this equals
      > to:
      >
      > ... WHERE (`Catalog`.desi gner LIKE ('Victorian' AND `Catalog`.width )) < 3
      >
      >
      >
      > http://dev.mysql.com/doc/mysql/en/op...recedence.html[/color]

      ~~~~~~~~~~~~
      Jefferis Peterson, Pres.
      Web Design and Marketing




      ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
      http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
      ----= East and West-Coast Server Farms - Total Privacy via Encryption =----

      Comment

      Working...