Salut tout le monde,
J'essaie de produire une instruction SQL qui n'apportera que des lignes avec des noms d'ID correspondants.
J'ai une liste d'utilisateurs que je veux insérer dans la chaîne SQL. Le problème est qu'il l'analyse avec des guillemets doubles au lieu de guillemets simples.
Names default to here (1);<BR />// got the userlist from a data table using dt:users << get as matrix<BR />userlist = {"01E1B5C0651EDA80", "F62B70921920FCBE", "909D35028E2039CE", "B339888591CF1346"};
<BR />// define an SQL string to host the list of user ids
sqlstr_ =
"SELECT \!"t1\!".uid
FROM \!"Tables\!".\!"Table\!" \!"t1\!"
WHERE ( \!"t1\!".uid IN ( ^userlist^) )
;";
Eval Insert( sqlstr_logs );
// i get the following non working SQL string
"SELECT \!"t1\!".uid
FROM \!"Tables\!".\!"Table\!" \!"t1\!"
WHERE ( \!"t1\!".uid IN ( {\!"01E1B5C0651EDA80\!", \!"F62B70921920FCBE\!", \!"909D35028E2039CE\!", }) )
;"
// i would like to get the following working SQL statement
"SELECT \!"t1\!".uid
FROM \!"Tables\!".\!"Table\!" \!"t1\!"
WHERE ( \!"t1\!".uid IN ( '01E1B5C0651EDA80' , 'F62B70921920FCBE' , 'F62B70921920FCBE' ) ) ;"
Merci beaucoup d'avance.