August 18, 2009 at 11:52 am
At the bottom of my script I'd like to get a column sum on a subquery. Every time I do a compute sum(tally) I get an error stating Invalid column name 'tally'. I've tried this with various subquery columns before and I get the same error. Is there a way around this?
August 18, 2009 at 12:28 pm
Oh and each record on the subquery will contain a whole number (basically number of days) that I'd like to keep there and then do a compute sum(days) at the end of the script.
August 18, 2009 at 1:35 pm
That's not really enough info to help you JM. You'll need to post some sample data, your expected results, and an example of the query that you already have that is not giving your the correct results. Table DDL would help a ton too.
Here's a link to how to create a thread that will get quality help:
http://www.sqlservercentral.com/articles/Best+Practices/61537/"> http://www.sqlservercentral.com/articles/Best+Practices/61537/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply