Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a student file with fields
Student_name
student_address
student_suburb
Other table is geographic file
domicile
code
I want to write here is
if (domicile = student_suburb, '1','0') as Area_Resident
But I am getting the error student_suburb not found
Could any one please advise
Thanks beforehand
I think you just need to review the model.
Here is an approach :
////
Table1:
load Student_name,student_address,student_suburb
From ....
left join
Table2:
load Student_name,domicile, code
From ....
Final:
noconcatenate
load *,if (domicile=student_suburb, '1','0') as Area_Resident resident Table1;
drop table Table1;
////
for example :
Table1:
load Student_name,student_address,student_suburb
inline [
Student_name,student_address,student_suburb
a,b,c
d,e,f
];
left join
Table2:
load Student_name,domicile, code
inline [
Student_name,domicile, code
a,g,h
d,f,j
];
Final:
noconcatenate
load *,if (domicile=student_suburb, '1','0') as Area_Resident resident Table1;
drop table Table1;
output:
I think you just need to review the model.
Here is an approach :
////
Table1:
load Student_name,student_address,student_suburb
From ....
left join
Table2:
load Student_name,domicile, code
From ....
Final:
noconcatenate
load *,if (domicile=student_suburb, '1','0') as Area_Resident resident Table1;
drop table Table1;
////
for example :
Table1:
load Student_name,student_address,student_suburb
inline [
Student_name,student_address,student_suburb
a,b,c
d,e,f
];
left join
Table2:
load Student_name,domicile, code
inline [
Student_name,domicile, code
a,g,h
d,f,j
];
Final:
noconcatenate
load *,if (domicile=student_suburb, '1','0') as Area_Resident resident Table1;
drop table Table1;
output:
Thankyou - it works