How is division by 0 handeled in a computed select statement. I have tried a case stmt. without luck.
Here is an example of what I'm trying to accomplish:
SELECT
d.first_name,
d.last_name,
r.Store_Id,
r.LMLY,
r.Gallons_1mo,
--(r.Gallons_1mo / r.LMLY)-1 as MOM_Change_Per
FROM...
I have a table called surveys with columns (store_id, survey_date) Store_id is an int, survey_date is a datetime. They query I need to write needs 2 greatest survey dates for each store in one bitlist.
Any assistance is appreciated (using sqlServer2000).
Thank you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.