I have a problem with Firebird (embedded) database. I would like to set a parameter values in the select statement. For example:
SELECT name, surname, :string AS myText
FROM myTable
where :string
is a parameter.
The above code works in SQLite and the result is (when the paramenter is "abcdef"):
+------+---------+---------+
|name |surname |myText |
+------+---------+---------+
|John |Black |abcdef |
+------+---------+---------+
|Thomas|Young |abcdef |
+------+---------+---------+
|... |... |abcdef |
+------+---------+---------+
|nameX |surnameY |abcdef |
+------+---------+---------+
When I try to execute this query then I get the following message: "An error was found in the application program input parameters for the SQL statement.
Dynamic SQL Error.
SQL error code = -804.
Data type unknown.