SQL query from Matlab
Mostrar comentarios más antiguos
Hi i am trying to format my sqlstr going into mysql but can't seem to get the format correct using sprintf function
here is the code i am using:
TableType = char(PramTest); TableRow = char(DataSelection);
%TableType reurns the value of 'SPEC' and TableRow = '1'.
sqlStrtest= sprintf('select * from %s where id%s = %d', TableType, TableType, TableRow); disp(sqlStrtest)
This reurns the following:
select * from where idSPEC = 83select * from where idPEC = 49
What i need it to return is
select * from SPEC where idSPEC = 1
can you help me please in quiring a correct format.
thank you
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre ARM Cortex-A Processors en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!