0

I have a table in Excel and I want to query Column J which in the table is called Questions for words matching some conditions.

So I have tried this syntax

Select * from TSO.RawData   where trademthstart > dateadd(month,-6,GETDATE())  order by row_date asc  WHERE Questions LIKE '%NRM%'

Which I got following this SO question https://stackoverflow.com/a/14290878/461887

However I get an error near where clause

Community
  • 1
  • 1
sayth
  • 6,696
  • 12
  • 58
  • 100

1 Answers1

1

Try this:

Select * from TSO.RawData   
where trademthstart > dateadd(month,-6,GETDATE())  
and Questions LIKE '%NRM%'
order by row_date asc

Seems the "order by row_date" should be placed after the filters (where, and). After Where, any other filters should start with AND.