I am stuck up in a pretty bad situation. I am having db columns such as mentioned below;
* Season Name People died (in US+UK+Asia)*
Winter 98
Fall 14
Rainy 148
Other 07
Now if there are no people who died in any of the season (say Fall season) then the row showing fall season is omitted. Hence the SP now returns the data something like;
* Season Name People died (in US+UK+Asia)*
Winter 98
Rainy 148
Other 07
Problem: I need to assign the values (second column) to the variables. I am fetching the SP result in dataset. But i don’t know how to find the values that are not omitted (Winter, Rainy, Other as seen above) and assign them to their respective variables. In that case the variable for fall season would be assigned 0.
Let me know if there is any query.
please help!.
Regards
You have a few options here, but if you don’t have database access (and from the comments above, it looks like you don’t):
INNER JOINfrom seasons to deaths-per-season instead ofLEFT JOINing seasons to deaths-per-season, which would return all seasons regardless of whether or not they have any deaths.You could also add each season that you’re aware of to a
const string[], but that’s a kludge to get around the fact that you don’t have easy database access. If you meet with a lot of resistance on this topic, try explaining that you need to display all of these seasons to the user and that you need the stored procedure updated.Good luck!