I want to join two tables using the same storage plugin. But one of the columns shows a null value. I am using this query: -
select * from SqlServer.test_mopslive.reports as Reports join SqlServer.test_mopslive.reportsetting as ReportSetting on Reports.ID = ReportSetting.ID
Here SqlServer is the name of the storage plugin, test_mopslive is the name of the database, reports , reportsetting are the names of the tables.
When executing this request, T_ID indicates Null.
But if I use two different names for the storage plugin with the same credentials, it works correctly.
TABLE 1: -
create table Reports (ID bigint, Name varchar(25)); insert into Reports values (29, 'SqlThree'); insert into Reports values (30, 'SqlTwo'); insert into Reports values (31, 'SqlThree');
TABLE 2:-
CREATE TABLE ReportSetting ( P_id bigint not null auto_increment primary key, Name varchar(25), ID bigint, CONSTRAINT fk_ID FOREIGN KEY (ID) REFERENCES Reports(ID)); insert into ReportSetting values (1,'My_Sreekant1', 29); insert into ReportSetting values (2,'My_Sreekant2', 30); insert into ReportSetting values (3,'My_Sreekant3', 31);
Is it possible to join two tables using the same plugin name for storage? If so, what am I doing wrong in this request?
source share