rkyyk
rkyyk

Reputation: 163

Selecting values from a query that are negative in Sybase

Im running the query

  SELECT ART_REF FROM tablename WHERE SEMESTER_NUM=28

This query returns both positive negative a 0 results in the forms of 8, -2, 0.

how can i just return the values that are negative (-8)?

I've tired using the LIKE operator but with no success.

Cheers

Upvotes: 1

Views: 576

Answers (1)

Robert
Robert

Reputation: 25763

Try this way:

SELECT ART_REF 
FROM tablename 
WHERE SEMESTER_NUM=28 
AND ART_REF <0

Upvotes: 2

Related Questions