Discussion board where members can get started with QlikView.
it seems that theres a problem with the following SQL sentence:
FROM table1, table2;
WHERE table1.id = 3 AND table1.name = table2.id
table1.name and table2.id contains "name". It's just a diferent field name with same info.
I've tested it in my SQL frontend tool and it works perfectly.
Thank you in advance!
Go to Solution.
Take this example:
Data:LOAD Field1, Field1_2, Field2;SQL SELECT t1.Field1, t2.Field1 AS Field1t2, t2.Field2 FROM table1 t1INNER JOIN table2 t2 on t1.name = t2.idWHERE t1.id = 3;
Hope that helps
You will have to specify all the feild names instead of '*' (in the load script also).
That usually happens to me in one of the following:
1.- There are duplcate names of fields in the query, when they come from different tables, and not using a LOAD statement.
2.- The ODBC / OLEDB driver doesn't understand a comma or some other character in the FROM clause.
I have worked that around renaming fields with a LOAD stantement or using an INNER JOIN clause instead of a FROM / WHERE table.field = table2.field2.
Hope that helps!
Maybe it is just a mistyping, but please check it - there must not be ';' before 'WHERE'.
There's no ";" after the from line.
Both tables have fields with same names (but different data!) and linked fields are designed with different names (table1.id is linked with table2.name but there's also a table2.id field).
Miguel (or anybody), could you give me an example in order to solve it? (I'm a database newbie....).
Thank you very much for alll the answers.
There's a mistake explaining that there's no FROM linked with the previous LOAD.
Anyway, it works and I've loaded all the info I need.
Thank you so much!