Rich K. Posted May 10, 2010 Posted May 10, 2010 Hi -- Lets say I have 2 tables an Employee Table and a Department Table. The Employee has the following fields (pkEmpID, fkDeptID, Name, Title) and the Department table has the following fields (pkDeptID, DeptName, DefaultTitle). Assuming I have Table Occurences the same name as the table and have the 2 TOs joined by fkDeptID. What are the benefits of having the following: Employee::Title ... Auto-Enter calculated value Lookup(Department::DefaultTitle) over Employee::Title ... Auto-Enter calculated value Department::DefaultTitle :)
comment Posted May 10, 2010 Posted May 10, 2010 What would you like to happen if an employee is re-assigned to another department?
Rich K. Posted May 10, 2010 Author Posted May 10, 2010 I'd like for the Title to change to the DefaultTitle of the newly assigned dept.
comment Posted May 10, 2010 Posted May 10, 2010 Why not use a straightforward lookup then? In terms of functionality, all three will behave the same in this situation (provided the auto-enters are set to replace existing value). When using the Lookup() function you get the option to specify a failExpression - though you could do the same using Case(), for example.
Rich K. Posted May 11, 2010 Author Posted May 11, 2010 Thank you for your insight ... besides the fail expression functionality, I really don't see any benefit from using Lookup(). It would be really great if the Replace Script Step would honor this calculation; now, that would be a real game changer!
comment Posted May 11, 2010 Posted May 11, 2010 It would be really great if the Replace Script Step would honor this calculation I'm afraid I have no idea what you mean by that.
Ashton Posted May 11, 2010 Posted May 11, 2010 It might be just me, but it does seem that auto-enter lookup is slightly faster than auto-enter calculation—even when using the Lookup function itself. The overall difference in data entry speed and responsiveness is significant enough to me, that I always try to use the former in place of the latter whenever possible. Anyone else have this experience?
comment Posted May 11, 2010 Posted May 11, 2010 It's best to test such things thoroughly rather than rely on subjective perceptions. A quick (and rather informal) test I performed importing ~100k records shows lookup to be about 14% faster than auto-enter.
Recommended Posts
This topic is 5369 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now