Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Valnar
Contributor II
Contributor II

Connector error: ERROR [3D000] [Qlik][MySQL] No database selected

Hi everyone, In the loading editor I am trying to build a table by concatenating data from a table to a table built by joining two different tables. This is a procedure that I have already used in other places in my code, where it works like a charm. Here, however, raises an error. My code is something like this:

 

[qlik_table_1]:
LOAD
  [field_1],
  [field_2];
SELECT `field_1`,
  `field_2`    
FROM DB.`table_1`
  WHERE `field_2` is not null;


JOIN([qlik_table_1])
LOAD
  [field_1],
  [field_3];
SELECT `field_1`,
    sum(`field_3`) as `field_3`
FROM DB.`table_2`
  GROUP BY `field_1`;

LOAD 
  [field_1],
  [field_2],
  [field_3],
SELECT DB.`table_3`.`field_1`,
  `field_2`,
  DB.`table_4`.`field_3`
FROM DB.`table_3`
  INNER JOIN DB.`table_4` ON DB.`table_3`.`field_2` = DB.`table_4`.`field_2`;

 

When I try to load the data, however, I get the error "Connector error: ERROR [3D000] [Qlik][MySQL] No database selected" on the following part:

SELECT DB.`table_3`.`field_1`,
  `field_2`,
  DB.`table_4`.`field_3`
FROM DB.`table_3`
  INNER JOIN DB.`table_4` ON DB.`table_3`.`field_2` = DB.`table_4`.`field_2`;

 

How is this possible, if the database is the same that I have used in all the other SELECT statements in the code? And how can I solve this?

 

Labels (1)
1 Solution

Accepted Solutions
Valnar
Contributor II
Contributor II
Author

Looks like the problem was due to me using the NUM() function in my SQL statement to set the value of a field in all the records. Removing that function and leaving the values as strings removed the error.

View solution in original post

1 Reply
Valnar
Contributor II
Contributor II
Author

Looks like the problem was due to me using the NUM() function in my SQL statement to set the value of a field in all the records. Removing that function and leaving the values as strings removed the error.