Viewing 15 posts - 76 through 90 (of 217 total)
SELECT (col1 * 1.0/col2 * 100) AS percentage FROM table1
why do you have to multiply one column by 1.0 and the other by 100?
Thanks!
March 14, 2007 at 7:41 am
Someone on usenet suggest this...I think it may work?
One way would be to turn your "workexpense" table into a derived
table:
select users.Uname, users.UnameFirst, users.UnameLast,
round(sum(workcompleted.WCmileage), 2) as totMileage,
round(sum(workexpense.WXamount), 2) as totExpenses
from workrequest,...
February 12, 2007 at 11:23 am
I have this query(below) that returns the type of format I want, but these results are wrong. I am not sure how to combine the two queries to get...
February 7, 2007 at 11:28 am
yeah like staying up til 5am looking at the screen until your eyes feel like they are going to fall out.
February 7, 2007 at 7:56 am
No need to be sorry. I have BOL and I've been using it for over a year now. It's a wonderful resource. But I've tried all sorts...
February 7, 2007 at 7:32 am
Yeah, this is getting confusing
I tried this, but it said Line 14: Incorrect syntax near '('.
I looked over and over the statement, but...
February 2, 2007 at 1:35 pm
Thanks! That works on my parred down query, but when I try to implement it on my real query, I get this error:
Invalid column name 'WXamount'
Here is the full...
February 2, 2007 at 1:05 pm
wow that generated over 46,000 rows! It should only be 20 or so. I am not sure why it...
February 2, 2007 at 12:41 pm
Here is a simplified query that returns the mileage and WCid(for reference).
If I take out the LEFT OUTER JOIN, the query returns the correct #'s. But I need that...
February 2, 2007 at 11:32 am
Thanks for your responses.
The workexpense table does not actually contain any mileage data. It just contains data that I need for the totExpenses column. All my mileage data,...
February 2, 2007 at 10:16 am
Hey Gopi! That worked! What did you do? I don't understand your logic behind the change.
But thanks!
September 11, 2006 at 2:01 pm
Data will be in the TotOpen column if PayDay is Null or WRcurrentStatus is not 110.
(NOTE: PayDay is the result of a subquery)
Data will be in TotVoid column...
September 11, 2006 at 12:30 pm
Sergiy, if I remove the entire GROUP BY, I still get this error:
Column 'requestgenerator.RGnameLast' is invalid in the select list because it is not contained in an aggregate function and...
August 11, 2006 at 6:23 am
But if I take WRnotes out of the GROUP BY I get the infamous error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Column 'workrequest.WRnotes' is invalid in the select list because it is not...
August 9, 2006 at 7:09 am
Sergiy, I should of said I did try that too. I've also tried using CAST instead of CONVERT. I have examined my query over and over and do...
August 9, 2006 at 5:57 am
Viewing 15 posts - 76 through 90 (of 217 total)