SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2007
    Location
    Australia
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    finding negative numbers

    Hey,

    I would like to write a sql statement for sql server that will pull all records from a table that have a negative number in a certain field. any ideas on how to do this?

    thanks.

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    where certain_field < 0
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    Spain
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code SQL:
    SELECT * FROM tab WHERE field<0
    "tab" is the name of your table, and "field" is the name of that certain field
    Link Exchange system - Submit your website/s and exchange links
    Aprende a programar - Conceptos básicos sobre programación
    Estadísticas de bolsa - Resultados en los índices bursátiles


Bookmarks

Posting Permissions

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