Hola todos,
Estoy tratando de producir una declaración SQL que traiga solo filas con nombres de identificación coincidentes.
Tengo una lista de usuarios que quiero que Eval inserte en la cadena SQL. el problema es que lo analiza con comillas dobles en lugar de comillas 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' ) ) ;"
Muchas gracias por adelantado.