Mark,
The view, as you suggested, works. But it gets to be complecated on how to use the view with SFQuery.
But what I found working, so far, is very simple solution: creating calculated field in SDT. The calculated field calls function GetInstockQuantity(). And the function GetInStockQuantity basically Selects Quantities from PARTSQTY table. I actually tried this approach yesterday, but it didn't work because I was using SUM() and now using SQL Select works better (because it automatically opens table if not opened and does not require changing of alias). I am still testing this "calculated" field approach on various parts of the program.
Thank you very much for your help.
BTW, do you know if it is normal that when I reply to your message, I don't see the text of your message? I am used, in other message boards (CIS, WestWind), where the message text to which you reply automatically copied to the reply message window. But maybe I am not using something properly (this is my 2nd day on UT).
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham