Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two tables. Table1 contains the all student details and Table contains only Passed student ID's. How can i get the only Failed student details.(I want load only fail student detilas).
Table1:
S.ID S.name DOB District
1 xxxxx 10051991 KADAPA
2 yyyyyy 10071991 CHITTORE
3 eeeeeee 05021991 NELLORE
4 ssssss 10051991 ANATAPUR
5. nnnnn 03031991 KADAPA
Table2:
S.ID(Passed)
1
3
4
I want load only fail student details; ( no need to load all table from the file)
EX: OUTPUT
S.ID S.name DOB District
2 yyyyy 10071991 CHITTORE
5 nnnnn 03031991 KADAPA
Table1:
SID1
concatenate
Table2
SID
where not exists (SID1,SID);
But iam getting results like this.....
S.ID,S.name,DOB,District
2,yyyyyy,10071991,CHITTORE
5,nnnnn, 03031991,KADAPA
1
3
4
I need to remove 1,3,4 SID. What can i do for remove that?
load * Inline [
S.ID
1
3
4
];
Right join
load * Inline [
S.ID, S.name, DOB, District
1, xxxxx, 10051991, KADAPA
2 , yyyyyy, 10071991 , CHITTORE
3 , eeeeeee , 05021991 , NELLORE
4 , ssssss , 10051991 , ANATAPUR
5 , nnnnn , 03031991 , KADAPA
]
where not Exists ([S.ID]);
You need to DROP Table Table1; at the end
Table1:
LOAD SID;
SQL SELECT *
FROM mohan.dbo.studentpassdetails;
Table2:
LOAD SID,
Student,
address,
DOB
Where not Exists(SID);
SQL SELECT *
FROM mohan.dbo.Studentdetails;
DROP Table Table1;