Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need help with the below code. In execution, the part highlighted (load resident) is ignored or something, for some reason, and I get error later on, in another tab, where table "person" is referred but is not found. This code does not generate any error. I went in debug and set bookmark on the load line and hit Run. The execution does not reach that point, never stops there. Are these scripts executed line by line in the sequence the lines are written? Other tabs have load resident, they all work. This one doesn't work. I tried replacind match with 0 = 0 but it does not work.
t_person:
LOAD
US_FNAME & ' ' & US_LNAME as User,POS_ID as PosID
;
SQL SELECT * FROM person inner join users on per_addedby = us_id inner join position_person_join on ppj_id_pers = per_id inner join positions on pos_id = ppj_id_pos
where pos_status = 'active';
join (t_person)
LOAD
POS_ID as PosID,
US_FNAME & ' ' & US_LNAME as Owner
;
SQL SELECT * FROM positions inner join users on us_id = pos_responsible;
person:
LOAD *
Resident t_person
where match(User,'Name1','Name2','Name3') = 0;
drop table t_person;
(code is simplified here, but the highlighted one is "as is" in the script)
Thank you for your help and your time.
d
Because
LOAD * RESIDENT t_person
will not create a new "person" table as you expect. It will concatenate the rows to t_person table because it has the exact same fields.
You need:
Person:
noconcatenate LOAD *
RESIDENT t_person;
Because
LOAD * RESIDENT t_person
will not create a new "person" table as you expect. It will concatenate the rows to t_person table because it has the exact same fields.
You need:
Person:
noconcatenate LOAD *
RESIDENT t_person;
where match(User,'Name1','Name2','Name3') = 0;// this will return who don't have username like Name1, Name2 and Name3 with case sensitive.
for in-case sensitive use like below
where wildmatch(User,'Name1','Name2','Name3') = 0;
Regards,
kabilan K.
Or just try without Where.
person:
LOAD *
Resident t_person;
Hi,
I think the tables t_person and Person have the same columns when you drop one table, the other table also deletes. To avoid this just add one dummy field.
t_person:
LOAD
US_FNAME & ' ' & US_LNAME as User,
POS_ID as PosID
;
SQL SELECT * FROM person inner join users on per_addedby = us_id inner join position_person_join on ppj_id_pers = per_id inner join positions on pos_id = ppj_id_pos
where pos_status = 'active';
join (t_person)
LOAD
POS_ID as PosID,
US_FNAME & ' ' & US_LNAME as Owner,
1 AS Temp
;
SQL SELECT * FROM positions inner join users on us_id = pos_responsible;
person:
LOAD
PosID,
Owner
Resident t_person
where match(User,'Name1','Name2','Name3') = 0;
drop table t_person;
Hope this helps you.
Regards,
Jagan.
THANK YOU ALL! I didn't know that it will do this append by default.
Multumesc frumos
deli