Viewing 15 posts - 91 through 105 (of 252 total)
Whew, busy times at work lately. I've been out of The Thread for a good bit :-).
Anyone else from The Thread planning to attend this week's SQL Saturday in...
May 1, 2014 at 7:38 am
If all you're looking for is to gobble up some memory...
SELECT NEWID()
FROM sys.columns A
CROSS JOIN sys.columns B
CROSS JOIN sys.columns C
That should chomp up a good amount. Just ran it...
April 29, 2014 at 8:30 am
Oh, yep, that's part of what's confusing me currently :-P. That query's part of a stored procedure, and it uses dynamic SQL; however, @StartDate and @EndDate are input parameters...
April 25, 2014 at 7:41 am
Haha, actually, this may be the result of an entirely different problem altogether :-P.
It seems that, for whatever reason, I can't get the procedure containing this query to have a...
April 24, 2014 at 2:32 pm
Thank you for the response, Ed!
Some of the answers to your questions are in my original post, but it's quite messy, so no fault of yours! Here's the bits...
April 23, 2014 at 12:38 pm
Eirikur Eiriksson (4/8/2014)
hisakimatama (4/8/2014)
EDIT: Doh, forgot the closing parenthesis.The parenthesis where the problem, a CTE does not require the columnar declaration.
😎
Aha, so it doesn't :-). I've always declared...
April 8, 2014 at 12:23 pm
Hrm. Seems like your CTE declaration is missing a few pieces; I believe it should be like so:
with UnloadDates(ShipmentId,StartTime,EndTime) as(
select DISTINCT ShipmentID,
(select Min(starttime)
from tblInvoice I
where I.ShipmentID = O.shipmentID
and DataSent...
April 8, 2014 at 11:30 am
Whew. Managed to get some testing done, and Luis's solution certainly worked out. Played around with the code and verified results for a month's worth of data, then...
March 26, 2014 at 2:36 pm
Aha! Did a quick test on my home instance, and that seems to do it. I'll investigate more when I'm back at work tomorrow and have more data...
March 25, 2014 at 4:50 pm
Nope, scheduling doesn't matter; if a gap in time exists anywhere, it needs to be reported. If a session starts as the first session of the day, and it...
March 25, 2014 at 3:11 pm
Sushant Yadav (3/21/2014)
USE master
GO
SELECT NAME,STATE_DESC FROM SYS.DATABASES
WHERE STATE_DESC='SUSPECT'
GO
2)
USE master
GO
ALTER DATABASE database_name SET EMERGENCY
GO
3)
DBCC CHECKDB (database_name)
GO
4)
ALTER DATABASE database_name SET SINGLE_USER WITH ROLLBACK IMMEDIATE
5)
DBCC CHECKDB (database_name, REPAIR_ALLOW_DATA_LOSS)
Please...
March 21, 2014 at 9:07 am
Data security certainly isn't something that's enforced very well, even by the agencies created to do so :-D. The company I work for handles some sensitive data that's required...
March 20, 2014 at 11:30 am
l.danks (3/14/2014)
hisakimatama (3/13/2014)
This will generate a test version of your table, for a proof-of-concept test, and make the UPDATE by generating...
March 14, 2014 at 9:37 am
I'll have a shot at the UPDATE part of this:
CREATE TABLE #Test(ID int,Comments1 varchar(2000),Comments2 varchar(2000),Stamp TimeStamp)
INSERT INTO #Test(ID,Comments1,Comments2)
SELECT 123456789, NULL, 'and here too'
UNION ALL
SELECT 123456789,'les was here',NULL;
WITH CTE(ID,Comment) AS(
SELECT ID,Comments1
FROM...
March 13, 2014 at 1:55 pm
Haha, yep. The others in my office made a similar remark; "The software is consistent. It's consistently inconsistent!". Which is true; some of the SQL in it...
February 24, 2014 at 2:40 pm
Viewing 15 posts - 91 through 105 (of 252 total)