I am trying to do a following thing:
private val preparedFindQuery = session.prepare {
s"""
|SELECT hash, art_index, operating_system, height, width, resolution, orientation, brand, model, networktype, network, aggcount
|FROM $keyspace.$table
|WHERE hash = :hash
| AND art_index >= :from_art_index
| AND art_index <= :to_art_index
| ORDER BY :orderCol :order
""".stripMargin.trim
}
Unfortunately I get the following error:
line 6:11 no viable alternative at input ':' (... <= :to_art_index ORDER BY [:]...)
com.datastax.driver.core.exceptions.SyntaxError: line 6:11 no viable alternative at input ':' (... <= :to_art_index ORDER BY [:]...)
Is it somehow possible to make this work or it is impossible to use order by programatically ? Thanks in advance