Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a table called Bookings in one tab in the run script and Patients in another tab in the run script. I need to join both the tables.
Bookings:
Load
ID,
Name,
Phone
;
From
Sql *......
The code I had written was
Patients:
Load
No as ID,
Location
;
Sql*......
LEFT JOIN (Patients)
Load
ID,
Name,
Phone
Resident Bookings;
I get a syntax error. Not sure if the left join code is the right one.
Bookings:
Load
ID,
Name,
Phone
;
From
Sql *......
join(Bookings)
Patients:
Load
No as ID,
Location
;
Sql*......
hope it helps
if it gives error then write in last load of your statement before ;
where not exit(ID);
The from keyword should probably be removed from your first load statement
Load
ID,
Name,
Phone
;
From
Sql *......
That last bit doesn't look right. You either use a preceding load without a from in the load statement (but it the sql statement does need it)
Load
a,b,c;
sql select * from mytable;
Or just
sql select a,b,c from mytable;
Or load from a non-sql source
Load
a,b,c
from myqvd (qvd);
Bookings:
Load
ID,
Name,
Phone
;
From
Sql *......
The code I had written was
concatenate(Booking)
Patients:
Load
No as ID,
Location
;
Sql*......
where not exit(ID); // before ';'in your sql satatement write this where condition.
Changed it. Both the tables load perfectly. Only when I add the Left join, it gives a syntax error.
you should have mark it as helpful or correct answer.
so it might be helpful for other developer
Thanks Mohit. I always mark if its a correct answer.
tell me what problem which you are facing now
Tables load perfectly. When I add the Left join, and reload it gives me a error.
Bookings:
Load
ID,
Name,
Phone
;
From
Sql *......
join(Bookings)
Patients:
Load
No as ID,
Location
;
Sql*......
hope it helps
if it gives error then write in last load of your statement before ;
where not exit(ID);
Hi,
In Join you have given the invalid table name(Booking instead of Bookings).
Bookings:
Load
ID,
Name,
Phone
;
From
Sql *......
join(Bookings)
Load
No as ID,
Location
;
Sql*......
Hope this helps you.
Regards,
Jagan.