【问题标题】:Query Error in ORMLite Update RawORMLite Update Raw 中的查询错误
【发布时间】:2014-03-12 11:30:23
【问题描述】:
String sql3 = "INSERT INTO temp_d_takingOrder(
    HeaderId,
    ItemCode,
    Qty1,
    Qty2,
    Qty3,
    RegDisc,
    ExtraDisc,
    OthersDisc,
    RegPerc,
    ExtraPerc,
    OthersPerc) 
SELECT 
    t._id, 
    m.itemCode,0 AS Qty1,
    0 AS Qty2,
    0 AS Qty3,
    0 AS RegDisc,
    0 AS ExtraDisc,
    0 AS OthersDisc,
    0 AS RegPerc,
    0 AS ExtraPerc,
    0 AS OthersPerc 
FROM m_Route AS m 
JOIN t_TakingOrder AS t ON 
    m.CustId = t.CustId **WHERE t.CustId=?"**;

dataTemp_d_TakingOrder.updateRaw(sql3);

当我使用WHERE t.CustId=? 时,查询不起作用。但是如果我删除这些语句,查询就可以工作了。你能帮帮我吗?

【问题讨论】:

  • 添加 where 子句并调用 updateRaw 而不提供任何值
  • “不工作”是什么意思?始终提供异常和特定的错误消息。
  • 这可能是@mihail 的答案。你应该把你的评论变成一个答案。

标签: android ormlite


【解决方案1】:

您添加一个 where 子句并调用 updateRaw 而不提供任何值。

【讨论】:

    猜你喜欢
    • 2018-04-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-01
    • 2012-02-21
    • 2018-05-09
    相关资源
    最近更新 更多