Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to solve this SQL Select?
Message
 
 
To
27/02/2006 15:09:56
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01099608
Message ID:
01099627
Views:
12
>
>Hi Dmitri,
>
>Try ...Sum(Nvl(Field, 00000.00))...
>
>I just saw Sergey's answer and reread the question, and he's got a better idea. But, even with Select Distinct you can have trouble if there are two (not repeated) child records in Table2 that have the same values.

Hi Cindy,

I have not tried your suggestion, yet, but it seems to me it would not work. You see, when I select the records without the GROUP BY all records have values. That is, none of them have NULLs. Therefore, I can't see how changing position of NVL from before SUM to after SUM should make a difference.

Thank you very much for your suggestion (which I will still try).
"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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform