Dan captured this correctly, > From: Dan Bron <j...@bron.us> > > Jordan Tirell wrote: > > I have found that they work fine with non-unique > > paths and use the earliest defined path by default. > > I don't use JDB, but from your description of the problem, I expect that > the authors of JDB knew that it selected the earliest defined path (this > is a common result of certain J primitives). I also suspect that they were > trying to dissuade you from relying on this behavior, for two reasons: > > (A) It's a bad idea from an application logic point of view, > because adding a new table or column could cause a completely > problems in a completely unrelated part of the code > (if the new table/column becomes the new earliest defined path). > > (B) They didn't want to guaruntee this behavior; they want the > freedom to change it in future versions without worrying about > backwards compatibility (which means even if you're careful > never to trigger the trap in (A), you could still get hurt).
The single column or table.column is a shortcut for those who know what they are doing to be used maybe in an interactive environment. But for lasting, scripted queries, use the full path. > This is analogous to the reasons that SELECT * ... is disfavored in the > SQL community. Except it more severe than SELECT * whose result is predictable provided you can handle the metadata appropriately. The consequences of using table.column or just column can be totally unpredictable, this is why the term "correctly" is used. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm