我正在尝试读取包含2,000个值的文本文件,但我的where子句会抛出错误。
SELECT mac.mac_id,mac.mac,mac.mac_type,record.soc_id
from mso_charter.mac
where record.soc_id in ('C:\Users\xyz\worldbox2_Prod_09-17-2017.txt')
join mso_charter.record on mac.record_id = record.header_id;
ERROR: syntax error at or near "join"
LINE 4: join mso_charter.record on mac.record_id = record.header_id;
^
********** Error **********
ERROR: syntax error at or near "join"
SQL state: 42601
Character: 155
答案 0 :(得分:0)
此:
v0.5 v0.6
WARNING: rmprocs: process 1 not removed | WARNING: rmprocs: process 1 not removed
20000 | 20000
20000 | 20000
20000 | 20000
From worker 3: 1 | From worker 3: 1
1 | 1
From worker 2: 10000 | From worker 2: 10000
From worker 3: 20000 | From worker 3: 1
除非你有多个soc_Id
SELECT mac.mac_id,mac.mac,mac.mac_type,record.soc_id
from mso_charter.mac
join mso_charter.record on mac.record_id = record.header_id
where record.soc_id in ('C:\Users\xyz\worldbox2_Prod_09-17-2017.txt');
不是这个:
where record.soc_id = ('C:\Users\xyz\worldbox2_Prod_09-17-2017.txt');
编译器非常挑剔订单
虽然执行顺序是