Viewing 15 posts - 1 through 15 (of 47 total)
GilaMonster (5/19/2015)
May 19, 2015 at 4:24 am
GilaMonster (5/19/2015)
cms9651 (5/19/2015)
GilaMonster (5/19/2015)
Declare @RangeStart varchar(20) = '01/01/2015 00:00:00', @RangeEnd varchar(20) = '01/01/2015 00:00:00' -- these come from the applicationWHERE toDate >= CONVERT (datetime,@RangeStart,103) and toDate < DATEADD(dd,1,CONVERT (datetime,@RangeEnd,103))
Even...
May 19, 2015 at 4:19 am
GilaMonster (5/19/2015)
Declare @RangeStart varchar(20) = '01/01/2015 00:00:00', @RangeEnd varchar(20) = '01/01/2015 00:00:00' -- these come from the applicationWHERE toDate >= CONVERT (datetime,@RangeStart,103) and toDate < DATEADD(dd,1,CONVERT (datetime,@RangeEnd,103))
Even if you...
May 19, 2015 at 3:59 am
GilaMonster (5/19/2015)
Ok, let's go back to the problem.What, exactly, are you trying to do? What data do you have? What should be returned by the query?
Thank you.
In the doTable in...
May 19, 2015 at 3:38 am
GilaMonster (5/19/2015)
cms9651 (5/19/2015)
AND doTableDate BETWEEN CAST('01/01/2014 00:00:00' AS DATE)
AND CAST('01/01/2014 00:00:00' AS DATE)
....
AND doTableDate >= CAST('01/01/2014...
May 19, 2015 at 3:24 am
GilaMonster (5/19/2015)
Your upper and lower bounds of the between are the same....
May 19, 2015 at 3:08 am
GilaMonster (5/19/2015)
Is this the same problem as you're discussing in the BETWEEN thread? If so, please post there and not in a new thread. Thanks
Thank you Sir.
Not Sir, is a...
May 19, 2015 at 2:45 am
Thank you very much for help.
May 19, 2015 at 2:03 am
ChrisM@Work (5/14/2015)
cms9651 (5/14/2015)
I have problem to execute query with interval date.
If try this query I don't have problem and the output is correct:
SELECT * FROM...
May 14, 2015 at 7:31 am
I tried this:
SELECT
case when ([ENER1] + [ENER2]) / 1000000 > 1 then
cast(Cast(Round(( [ENER1] + [ENER2] ) / 1000000, 2) AS NUMERIC(9, 2)) AS VARCHAR(10))
else
'0' + cast(Cast(Round(( [ENER1] + [ENER2]...
February 20, 2014 at 9:25 am
:doze:
7.89
3.07
1.78
1.68
1.59
1.36
1.09
00.97
00.92
00.82
00.81
00.79
00.79
00.77
February 20, 2014 at 9:13 am
thank you, is better but still without a leading zero before the decimal point ...
7.89
3.07
1.78
1.68
1.59
1.36
1.09
.97
.92
.82
.81
.79
.79
February 20, 2014 at 9:02 am
I tried this but :
SELECT
ROUND((
[ENER1] + [ENER2]
) / 1000000,2) AS pG
FROM
[dbo].[doTable40]
WHERE
(
[ENER1] > 0
OR [ENER2] > 0
)
GROUP BY
[ENER1],
[ENER2]
HAVING
YEAR (MAX([theDate])) >= YEAR (GETDATE())
ORDER BY
pG DESC;
7.89000000
3.07000000
1.78000000
1.68000000
1.59000000
1.36000000
1.09000000
.97000000
.92000000
.82000000
.81000000
February 20, 2014 at 8:44 am
The numbers of SUM are correct.
My question is in output of this SUM:
7.88528800 ====> I need 7.89
3.06978700 ====> I need 3.07
1.78070800 ====> I need 1.78
1.67984500 ...
1.59402600 ...
1.36468000 ...
1.09013200 ...
.96727700 ...
February 20, 2014 at 8:31 am
many thanks for help !!!!
February 20, 2014 at 7:14 am
Viewing 15 posts - 1 through 15 (of 47 total)