I want to join two table using same storage plugin. But One Of the Column showing 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 Storage Plugin Name, test_mopslive
is Database Name, reports
, reportsetting
are Table Names.
While executing this query T_ID showing Null.
But If I am using two different storage plugin name with same credential it works properly.
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 table using same storage plugin name? If yes,then What am I doing wrong in this query?