how to write a sql query with multiple variables
5 ビュー (過去 30 日間)
古いコメントを表示
sir, i want to write a SQLquery in which in the where clause i use two variables on two fields.
i tried the following, but getting error messages.
let
x=1; % Variable1
y=4; % Variable2.
curs=exec(conn,['select all from _tablename_ where field1=',num2str(x),and 'field2=',num2str(y)]);
curs=fetch(curs);
I am getting error message.
please guide me.
1 件のコメント
Stephen23
2016 年 8 月 2 日
@Mechanical Engineering: please give us the complete error message. This means all of the red text.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Database Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!