views:

27

answers:

1

i have simple table with two fields: ID and Date

how can i do Select that will return true or false, of course without Scalar-valued Functions

it must be something like that:

SELECT (Date < getdate()) as mu_value FROM my_table
+4  A: 

I use something like:

SELECT
  CASE
    WHEN mt.Date < getDate() THEN 1
    ELSE 0
  END as mu_value
FROM my_table mt

Of course, you can substitute whatever you like for 1 and 0.

David B
thank, i will try
msony