我已经为我的 netezza db 构建了流动的 SQL:
select t.TRADE_OID, t.TRADE_ID, t.TRADE_VERSION, t.TRADE_SOURCE_SYSTEM, tl.LINK_PARENT_ID,
tl.LINK_PARENT_VERSION, tc.CHARGE_AMOUNT FROM EQ_MO_TRADE (NOLOCK) t, EQ_MO_TRADE_CHARGE (NOLOCK) tc, EQ_MO_TRADE_LINKAGE (NOLOCK) tl
WHERE t.Last_update_time >= '2013-01-09 00:00:00'
AND t.last_update_time < '2013-01-10 00:00:00'
AND t.TRADE_OID = tl.TRADE_OID
AND t.TRADE_OID = tc.TRADE_OID
AND tc.CHARGE_NAME = 'Commission'
但是我得到了一般错误:
[SELECT - 0 row(s), 0.000 secs] [Error Code: 1100, SQL State: HY000] ERROR: 'select
t.TRADE_OID, t.TRADE_ID, t.TRADE_VERSION, t.TRADE_SOURCE_SYSTEM, tl.LINK_PARENT_ID, tl.LINK_PARENT_VERSION, tc.CHARGE_AMOUNT FROM EQ_MO_TRADE (NOLOCK) t, EQ_MO_TRADE_CHARGE (NOLOCK) tc, EQ_MO_TRADE_LINKAGE (NOLOCK) tl
WHERE t.Last_update_time >= '2013-01-09 00:00:00'
AND t.last_update_time < '2013-01-10 00:00:00'
AND t.TRADE_OID = tl.TRADE_OID
AND t.TRADE_OID = tc.TRADE_OID
AND tc.CHARGE_NAME = 'Commission' limit 1000'
error
^ found "(" (at char 150) expecting `EXCEPT' or `FOR' or `INTERSECT' or `ORDER
字符 150 介于这两者之间:
贸易和(NOLOCK)
我的语法似乎正确,但 DBVisualiser 不会运行查询。