ORMLite Update Raw中的查询错误

时间:2014-03-12 11:30:23

标签: android ormlite

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=?时,查询无效。但是,如果我删除那些语句,查询就可以了..你可以帮我吗?

1 个答案:

答案 0 :(得分:0)

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