First select a data source.

You tried to run an SQL statement before you selected a data source. Click Data Sources in the Execute SQL dialog box, and then select a data source.