Insert into sql_replace values ('xxx','''A'',''B'',''C''');
Note: All single quotes. To include a single quote in a single quoted string,
it needs to be doubled.
Not sure what you are trying to do here. Build SQL queries on the fly?
-----Ursprüngliche Nachricht-----
Von: sqlite-users [mailto:[email protected]] Im
Auftrag von Bart Smissaert
Gesendet: Freitag, 27. Juli 2018 10:38
An: General Discussion of SQLite Database <[email protected]>
Betreff: [EXTERNAL] [sqlite] How to insert this string?
Have a table like this:
create table sql_replace(string_old text, string_new text)
The idea is to do automatic string replacements in SQL.
Say we have this SQL:
select * from table1 where a in(xxx)
then after the string replacement it should be this:
select * from table1 where a in('A', 'B', 'C')
Having some trouble inserting the 2 strings, xxx and 'A', 'B', 'C'
in the table. Tried various constructions, but getting errors. I can see this
will be a lot easier to do in code with place holders and bound values, but in
this case I need to do it with direct SQL in an Android phone app.
Any advice how to do this in direct SQL?
RBS
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
___________________________________________
Gunter Hick | Software Engineer | Scientific Games International GmbH |
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43
1 80100 - 0
May be privileged. May be confidential. Please delete if not the addressee.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users