views:

36

answers:

2

In ms-access database i have a table named tableA

this table has a column called Call_Date which has 4 types of entries

  1. dates ( e.g 10/23/2008 )
  2. -
  3. NA
  4. Blanks ( empty cell )

how can i write a query to select all rows of tableA except those where the Call_Date column has - or NA or Blanks

i tried writing

Select * from tableA where Call_Date not in ('-','NA',' ');

but its giving type mismatch error.

A: 

You could try casting the Call_Date field as a string

Select * from tableA where Cstr(Call_Date) not in ('-','NA',' ');

Although I would think the datatype of Call_Date should be string if it can have all those entries

keith
+1  A: 

I am assuming that Call_Date must be string type in the table.

Select * from tableA where IsDate(Call_Date) = true
shahkalpesh