Viewing 15 posts - 2,521 through 2,535 (of 11,678 total)
You cannot put a SUM inside a SUM.
If you would post the table DDL, some sample data and the desired output, it would be easier for people to help you.
June 19, 2014 at 5:10 am
Gaja (6/19/2014)
Thanksfind simple way
SET @getdate-2 = Convert(Varchar,@getDate,101)+' 01:00:00.000'
I try to use date functions more instead of relying on string manipulation and implicit conversions, but that's a personal choice.
June 19, 2014 at 5:06 am
Koen Verbeeck (6/19/2014)
GBeezy (6/18/2014)
June 19, 2014 at 4:52 am
GBeezy (6/18/2014)
June 19, 2014 at 4:51 am
Gaja (6/19/2014)
Yes i want to fetch data 1 am to 1 Am yesterdays date
That is still not a question, but anyway...
DECLARE @startDate DATETIME, @endDate DATETIME, @getdate-2 DATETIME;
SET @getdate-2 = GETDATE();
SET...
June 19, 2014 at 4:39 am
Is there a question?
June 19, 2014 at 4:23 am
melanie.townsend (6/19/2014)
June 19, 2014 at 4:18 am
mattech06 (6/19/2014)
Hi thanks,I don't think it will ever be zero but if it is it needs to be treated as if it was a positive
In that case (pun intended), stick...
June 19, 2014 at 4:06 am
Or if you dislike CASE statements (some people do):
SELECT Variance = SYS + SIGN(SYS) * (-1) * BANK
FROM myTable;
The only problem is when SYS is 0. What does your formula...
June 19, 2014 at 3:22 am
SELECT Variance = CASE WHEN SYS >= 0.0 THEN SYS - BANK ELSE SYS + BANK END
FROM myTable;
June 19, 2014 at 3:17 am
crazy_new (6/19/2014)
... But how can I get it to work where the case id is like the above?
Either make sure the query returns only one value, or use IN instead...
June 19, 2014 at 3:07 am
Because you are comparing a single value, ct.id, against the result set of a query.
If they query returns multiple rows, how can it compare it against the single value?
For example:
5...
June 19, 2014 at 2:32 am
Lempster (6/19/2014)
Rename the configuration table and see which packages fail when executed! 😉
I like the way you think, but this doesn't necessarily lead to failures.
If a package configuration fails, the...
June 19, 2014 at 1:17 am
TomThomson (6/18/2014)
Koen Verbeeck (6/18/2014)
On site means on site. Even a private cloud is not possible, since SQL Azure is not a private cloud technology.
So you claim that is someone uses...
June 19, 2014 at 1:06 am
rhythmk (6/19/2014)
A newly hired developer who works remotely has asked for permission to run Profiler so he can see the reads/writes used by his queries
Permission to...
June 19, 2014 at 1:03 am
Viewing 15 posts - 2,521 through 2,535 (of 11,678 total)