Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I was trying to get data from two tables in db that I have connected through ODBC. not sure exactly how to do it because I was trying basic queries I learnt in db400.
ODBC CONNECT TO trial;
//-------- Start Multiple Select Statements ------
SQL SELECT *
FROM graphdata.`response_measured`;
//-------- End Multiple Select Statements ------
/*TARGET TABLE */
LOAD [setup],
'Responsiveness' as Domain,
[sku],
[KPI],
[target]
as [SQL SELECT *
FROM graphdata.`response_target`;]
AND I'm getting this error
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.`response_target`;]
///$tab Perf
>>>>>>ODBC<<<<<< CONNECT TO trial
please let me know where I'm going wrong
Try to remove the square brackets [ ] around the SQL Query, also delete 'as' infront of SQL...
Try to remove the square brackets [ ] around the SQL Query, also delete 'as' infront of SQL...
This is your problem:
LOAD [setup],
'Responsiveness' as Domain,
[sku],
[KPI],
[target]
as [SQL SELECT *
FROM graphdata.`kbl_one_voice_responsiveness_target`;]
Remove the bold "as" and square brackets and add a semicolon after [target]
LOAD [setup],
'Responsiveness' as Domain,
[sku],
[KPI],
[target];
SQL SELECT *
FROM graphdata.`kbl_one_voice_responsiveness_target`;