How to overcome the error when joining join tables with another table

While we are trying to join join tables on one side with another table on the other side,

SELECT A.x,B.y FROM ([DataSet.Liad],[DataSet.Livne]) AS A INNER JOIN [DataSet.Names] AS B ON A.ID = B.ID LIMIT 10

we get this error:

Error: 2.1 - 0.0: JOIN cannot be applied directly to table joins or to the table expansion function. Consider combining a lookup function in a table or a table in a subquery (for example, SELECT *).

To solve this error, I suggest you use View. Save this join request as a view, DataSet.LiadLivne:

SELECT * FROM [DataSet.Liad],[DataSet.Livne] 

Run the start request using the view:

SELECT A.x,B.y FROM [DataSet.LiadLivne] AS A INNER JOIN [DataSet.Names] AS B ON A.ID = B.ID LIMIT 10

Enjoy

+4
source share
1 answer

You need to write how:

SELECT A.x,
       B.y
FROM
  (SELECT A.x
   FROM ([DataSet.Liad],[DataSet.Livne])) AS A
INNER JOIN [DataSet.Names] AS B ON A.ID = B.ID LIMIT 10
+4
source

Source: https://habr.com/ru/post/1599721/


All Articles