Sat 18 Jul 2020
Enduring favorite - Getting Data out of Notes (for whatever reason)
Thu 9 Jul 2020
Maximizing power while minimizing code and effort
Fri 29 May 2020
Round tripping, even while staying put
Free Midas software plus a contest
Wed 2 Jun 2010, 01:43 PMTweet
by Ben Langhinrichs
Copyright © 2010 Genii Software Ltd.
What has been said:
895.1. Jerry Carter (06/02/2010 08:21 PM)
Congratulations on your release, Ben. The 'free sample' is a time honored institution of capitalism. :-) May it reap the intended benefits for you and the community.
895.2. Richard Schwartz (06/02/2010 08:33 PM)
Does the key matching assume the the KeyColumn(+chunk) is a sorted list of values?
895.3. Ben Langhinrichs (06/02/2010 09:01 PM)
Jerry - Thanks!
Richard - By default it does not, since ad hoc data is so often... ad hoc, and since any one table can have at most 255 rows. There may be a property setting which can turn the aware of sorting back on. Let me know if you want that, as the engine certainly supports it.
895.4. Richard Schwartz (06/02/2010 09:36 PM)
Actually, I think it is preferable that it does not assume sorting, so don't add a property setting on my account!
Next question: since it does not assume sorting, am I correct in assuming that multiple matches will be found, even if separated by non-matching rows?
895.5. Ben Langhinrichs (06/02/2010 10:06 PM)
That is correct. It returns a value from each row that matches. For example, in the Currency fluctuation table from the sample db, you have two tables with dates in the format mm/dd/yyyy in the first column, and a conversion rate between US dollars and the Euro in the second column. If you want to get the average rate for the 13th of each month (06/13/2009, 07/13/2009 all the way to 05/13/2010), you would use the following formula (two @DbLookups because there are two tables):
rates := @DbLookup("Midas":"NoCache"; ""; @DocumentUniqueID; "Body":"Inside Table 1; Table 1"; "/13/"; 2; "Format=Number KeyMatch=SUBSTR"):@DbLookup("Midas":"NoCache"; ""; @DocumentUniqueID; "Body":"Inside Table 1; Table 2"; "/13/"; 2; "Format=Number KeyMatch=SUBSTR");
avg := @Sum(rates)/@Elements(rates);
895.6. Ulrich Krause (03.06.2010 05:02)
Hint: the sample database is encrypted ...
895.7. Ben Langhinrichs (06/03/2010 12:47 PM)
Sorry about the encryption. I had a small problem, fixed it and accidentally put up the encrypted version. Will fix in about half an hour.
895.8. Ben Langhinrichs (06/03/2010 02:27 PM)
Should be fixed now.
895.9. Ulrich Krause (04.06.2010 05:35)
How do I get a list of valid "chunkdefs"? Table or Bullet are in the sample. What about others?