Android Question SOLVED: SQLite concatenation

peacemaker

Expert
Licensed User
Longtime User
HI, All

B4X:
android.database.sqlite.SQLiteException: near "||": syntax error (code 1): , while compiling: SELECT FName || ' ' || Name || ' ' || SName ', ' || Position FROM CompanyWorkers WHERE UserID = 'F185C519D5E91F03'

Requested like
SQL.ExecQuerySingleResult(req)

Why error?

SOLVED:
B4X:
$"SELECT IfNULL(FName,'') || " " || IfNULL(Name,'') || " " || IfNULL(SName,'') || ", " || IfNULL(Position,'') FROM CompanyWorkers WHERE UserID = '"$ & UserID & "'"
 
Last edited:
Top