Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I had to learn it the hard way autonumber isn't always the best way to create system key when you have a complex data model. Such a pain to change hundreds and thousands of lines of code to find out half of your tbl is empty because a couple 'keys' don't recognize each other.
Can someone please give me a bulletin list of the limitation of this function?
What I found is that if I created a key in one table and join that key to another table, and join other data on the second table, 2 separate keys are populated.
main:
load
autonumber(product,attribute) as key
value2,
value3
from main;
left join (main)
load
autonumber(product,attribute) as key,
autonumber(product,location) as prodloc_key,
from translation_tbl;
left join (main)
autonumber(product,location) as prodloc_key
value X
from table2;
I receive nothing from value X, looks like I need to join location to main first and then populate the prodloc key in main or I will get nothing left join from table2.
Hello,
I believe the syntax you are using for your autonumber is incorrect. I propose you try this way:
main:
LOAD autonumber(product & '~' & attribute, 'key') as key,
value2,
value3
from main;
left join (main)
LOAD autonumber(product & '~' & attribute, 'key') as key,
autonumber(product & '~' & location, 'prodloc_key') as prodloc_key,
from translation_tbl;
left join (main)
LOAD autonumber(product & '~' & location, 'prodloc_key') as prodloc_key,
value X
from table2;
The second parameter in the AutoNumber() function is for stipulating a named reference.
Regards,
Philippe
is this the same for autonumberhash###?
Yes it is