I am trying to construct an sql expression using python and afterwards pass it as an input to the arc catalogue select tool. As shown in the following image I am passing a station_ID as a string to my python tool. As shown in the txt document of the image it constructs the sql expression. This expression (where clause), is passed as an argument in the Select tool.
The problem is that Select tool does not realise the input as a where clause, since it returns all rows of my datasource.
How can I correctly construct a where clause or a more complicated query and pass it as an argument to another tool?