In this SQL query
INSERT INTO RESULT_FILTER (RESULT_FILTER_NAME, RESULT_FILTER_SQL)
VALUES ('German Power Trades flagged red',
'" AND worst_status = 'R' AND country = 'DE' AND commodity = 'EL'"');
There is the problem that SQL Server can't handle the 'R' and 'DE' and 'EL' inside of the "AND worst_status='R' AND country='DE' AND commodity='EL'"'
This error occurs:
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near 'R'.
Is there another syntax I have to use inside the quote to let SQL Server see it just as a quote? I am using Microsoft SQL Server Management Studio 2017