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

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.