Why do I get the error “Error using vertcat Dimensions of arrays being concatenated are not consistent.”?

1 次查看(过去 30 天)
Can anybody help me with this?
I try to get data from an SQL database but only get this error (see attachment).
Best regrads
  2 个评论
Adam Danz
Adam Danz 2019-11-1
When you vertically concatenate A and B the number of columns in A and B must match. In your case, they do not. That's the best answer you'll get with the limited data you've shared.

请先登录,再进行评论。

回答(1 个)

Julian
Julian 2019-11-1
Could it be that your variable strHH is not a row vector char array?
I find it useful to define sql statement in a separate literal with a string column vector, so you can read it clearly but without all the ... continuations
sql = ["select * "
"from dual "
"order by dummy"]
sql = join(sql, newline)
exec(conn, sql, ...

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by