Viewing 15 posts - 2,446 through 2,460 (of 8,731 total)
There are 2 other ways that might possibly help you.
One is to use the window functions capabilities introduced in SQL Server 2012: http://sqlmag.com/sql-server-2012/how-use-microsoft-sql-server-2012s-window-functions-part-1
The second one is to use the Quirky...
July 25, 2016 at 8:18 am
Anandkumar-SQL_Developer (7/25/2016)
CREATE TABLE SumPositiveNegative
(
ID INT
)
GO
INSERT INTO SumPositiveNegative VALUES
(1),
(-1),
(2),
(-1),
(3),
(-3)
GO
select * from SumPositiveNegative
-- Expected_output :
SumIgnoring-ve_symbolsTotalSum+VeSum-VeSum
11 ...
July 25, 2016 at 8:10 am
Yes, that's why we have column alias. Remove the star(*) and explicitly list the columns and add alias as needed.
July 25, 2016 at 8:05 am
It seems that you're not managing the log adequately, as previously stated. You can either change the recovery mode to simple and lose the benefits of minimal data-loss or you...
July 25, 2016 at 6:52 am
Anandkumar-SQL_Developer (7/25/2016)
SELECT Value
FROM
#first_nonzero
WHERE %%PhysLoc%% >=
...
July 25, 2016 at 6:19 am
ChrisM@home (7/22/2016)
Post your code. Reduce the pointless guesses. Thanks.
+1
July 22, 2016 at 1:12 pm
Brandie Tarvin (7/22/2016)
jasona.work (7/22/2016)
Crafting up some easy-to-use backup reports that the...
July 22, 2016 at 12:53 pm
Ahem...
Luis Cazares (7/22/2016)
Have you tried printing the statements before executing them? Maybe a null is giving you problems.
July 22, 2016 at 10:20 am
Grumpy DBA (7/22/2016)
Revenant (7/22/2016)
Ed Wagner (7/22/2016)
Luis Cazares (7/22/2016)
crookj (7/22/2016)
RedBlue
Sky
Rainbow
Pot o' gold
leprechaun
July 22, 2016 at 9:05 am
ben.brugman (7/22/2016)
Luis Cazares (7/21/2016)
Similar logic, shorter version.
SELECT DATEADD(month,12*(YEAR(GETDATE())-1902)+3,0)
This is a bit 'short' I would guess:
SELECT DATEADD(month,12*(YEAR('20160401')-1902)+3,0) -- Result 2014-04-01 00:00:00.000
SELECT DATEADD(month,12*(YEAR('20160331')-1902)+3,0) --...
July 22, 2016 at 7:45 am
Have you tried printing the statements before executing them? Maybe a null is giving you problems.
I would suggest that you follow twin devil's recommendations. I disagree on the reason for...
July 22, 2016 at 7:23 am
Just add the column to your first query. Here's a shorter version.
SELECT h.server
, j.name
, h.run_date
,...
July 21, 2016 at 12:51 pm
CELKO (7/21/2016)
July 21, 2016 at 12:23 pm
fergfamster (7/21/2016)
Thanks, I dont really want to post 15 files you guys need to review to get an answer. ill figure it out.
15 files? Why? It's just DDL for tables...
July 21, 2016 at 11:45 am
Viewing 15 posts - 2,446 through 2,460 (of 8,731 total)