我试图从db中通过ODBC连接的两个表中获取数据。不确定如何做到这一点,因为我正在尝试在db400中学到的基本查询。
ODBC CONNECT TO trial;
//-------- Start Multiple Select Statements ------
SQL SELECT *
FROM graphdata.`kbl_one_voice_responsiveness_measured`;
//-------- End Multiple Select Statements ------
/*TARGET TABLE */
LOAD [setup],
'Responsiveness' as Domain,
[sku],
[KPI],
[target]
as [SQL SELECT *
FROM graphdata.`kbl_one_voice_responsiveness_target`;]
我收到此错误
Syntax error
Unexpected token: 'ODBC', expected one of: ',', 'AutoGenerate', 'From', 'From_Field', 'Inline', 'Resident', 'Where', ...
LOAD [setup],
'Responsiveness' as Domain,
[sku],
[KPI],
[target]
as [SQL SELECT *
FROM graphdata.`kbl_one_voice_responsiveness_target`;]
///$tab KBL_Perf
>>>>>>ODBC<<<<<< CONNECT TO trial
请让我知道我哪里出错了
答案 0 :(得分:2)
您不应该在[]
LOAD
setup,
'Responsiveness' as Domain,
sku,
KPI,
target
;
SQL
SELECT
*
FROM
graphdata.`kbl_one_voice_responsiveness_target`
;
除非它们包含空格,否则不需要在[]
中包裹字段。