SQL Statement

if i use the following statement, i receive the Nummer propper.
SQL=“SELECT Nummer FROM Sponning WHERE Type=‘17x57 Bi’;

But i like to use for ‘17x57 Bi’ a string varable.
How to do that ??

SQL=“SELECT Nummer FROM Sponning WHERE Type=” + myvariablehere + “;”

You might want to add the single quotes as well…

SQL=“SELECT Nummer FROM Sponning WHERE Type=” + myvariablehere + “;”

Or better, use PreparedStatements. There might be single or double quotes in the string passed, you never know :slight_smile:
http://documentation.xojo.com/index.php/Preparedstatement

Thanks, you have help me, all the answers i can use.

it also works without the “;” at the end