SQL query from Matlab
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su ARM Cortex-A Processors in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!