Viewing 15 posts - 2,866 through 2,880 (of 8,731 total)
DuncEduardo (5/11/2016)
Simple little requirement.
Need to display first date of each of the 12 months prior to current date, i.e. "Last Twelve Months" for reporting purposes.
i.e. today is 10th May 2016...
May 11, 2016 at 7:50 am
It includes a workaround posted in here: https://blogs.msdn.microsoft.com/sqlagent/2012/07/12/workaround-sql-server-2012-openrowset-on-sp_help_job-throws-the-metadata-could-not-be-determined/
May 10, 2016 at 2:06 pm
Lynn Pettis (5/10/2016)
Eirikur Eiriksson (5/10/2016)
Michael L John (5/10/2016)
Lynn Pettis (5/10/2016)
May 10, 2016 at 2:00 pm
May 10, 2016 at 1:59 pm
ettentrala (5/10/2016)
Drew, thanks for responding.....I'm not sure I understand what you mean.
Did you read the article that Drew referenced?
May 10, 2016 at 1:26 pm
Try this to get the rows causing errors.
SELECT
a.systemname AS HostName,
left(a.deviceid,1) AS DriveName,
a.drivesize,
a.freespace
FROM [dbo].[DriveStatus]...
May 10, 2016 at 12:20 pm
whereisSQL? (5/10/2016)
Ed Wagner (5/10/2016)
Manic Star (5/10/2016)
crookj (5/10/2016)
Ed Wagner (5/10/2016)
djj (5/10/2016)
whereisSQL? (5/10/2016)
Ray K (5/10/2016)
Ed Wagner (5/10/2016)
crookj (5/10/2016)
Grumpy DBA (5/10/2016)
Ed Wagner (5/10/2016)
DogDawg
Deputy
Sheriff
I shot the...
Confession
True
Lies
Fibs
Dibs
Nibs (coffee)
Cacao
Chocolate
May 10, 2016 at 12:07 pm
You could use the DelimitedSplit shared in this article: http://www.sqlservercentral.com/articles/Tally+Table/72993/
DECLARE @IDList NVARCHAR (1000) = '1|2|3|4|5'
DECLARE @NameList NVARCHAR (1000) = 'AAA|BBB|CCC|DDD|EEE'
DECLARE @Delimiter VARCHAR (1) = '|'
DECLARE @Operation VARCHAR (10) = 'INSERT'...
May 10, 2016 at 12:02 pm
Try this:
CREATE VIEW ViewName
AS
SELECT [student#]
,[class_position]
,case when [class_position] > 0 then CONVERT(int, [Class_Rank]) else CONVERT(int, [Class_Seq]) end as [List]
FROM School
May 10, 2016 at 10:43 am
wwwnlc111 (5/10/2016)
It's only integer
Is the data type an integer?
May 10, 2016 at 8:30 am
Check the following article http://www.sqlservercentral.com/articles/T-SQL/63681/
Also, remember that you have other aggregate functions like MAX and not only what it's used in the article.
May 10, 2016 at 6:26 am
Something shorter, not sure if that means better. 😀
SELECT current_value=some_bigint,
next_place_value=POWER(10,CAST(LOG10(some_bigint) AS INT)+1),
next_place_value=POWER(10,LEN(some_bigint))
FROM #bigints;
May 9, 2016 at 1:36 pm
You'll be missing any holidays. To prevent that, you'll need to create a calendar table or at least a holidays table.
May 9, 2016 at 10:30 am
There seems to be a SQL User Group in Toronto, but I'm not sure how active they are.
May 9, 2016 at 10:23 am
Ed Wagner (5/9/2016)
Grumpy DBA (5/9/2016)
Ed Wagner (5/9/2016)
PlunderPillage
Treasure
Hunt
May 9, 2016 at 7:56 am
Viewing 15 posts - 2,866 through 2,880 (of 8,731 total)