Viewing 15 posts - 4,756 through 4,770 (of 5,393 total)
Jason, you forgot to mention:
"put the pork chops in the launcher and aim to a clueless OP or wannabe DBA":-D
-- Gianluca Sartori
October 21, 2009 at 10:31 am
OK, that's fine...
You just have to make a small additional effort and change the sample data you posted into something like:
INSERT INTO #Table
SELECT values UNION ALL SELECT values ... etc
And...
-- Gianluca Sartori
October 21, 2009 at 10:27 am
GSquared (10/21/2009)
The Not Exists correlated sub-query will almost certainly end up with the same execution plan as the Left Outer Join. At least, that's what I've seen most times.
That's...
-- Gianluca Sartori
October 21, 2009 at 9:21 am
That record belongs to an uncommited transaction.
What I find strange is that after stopping /starting the service (which I would never have recommended!!!), all uncommited transactions should have gone rolled...
-- Gianluca Sartori
October 21, 2009 at 9:08 am
Fill the blanks and you'll get your answer:
--Drop temporary table
IF OBJECT_ID('tempdb..#tblStmtChar') IS NOT NULL DROP TABLE #tblStmtChar
--Create temp test table
CREATE TABLE #tblStmtChar(
CSNum smallint NOT NULL,
CharNum int NULL,
StmtNum int NOT NULL,
SurveyNum...
-- Gianluca Sartori
October 21, 2009 at 9:03 am
I'll quote myself as Steve did:
A few answers from these forums won't turn a wannabe DBA into a real DBA.
He had the job, so, why bother?
Now we may just hope...
-- Gianluca Sartori
October 21, 2009 at 8:43 am
Glad I could help.
-- Gianluca Sartori
October 21, 2009 at 8:41 am
Look up the ROUND function in BOL.
ROUND(number, 2) should do the job.
-- Gianluca Sartori
October 21, 2009 at 8:36 am
GabyYYZ (10/21/2009)
-- Gianluca Sartori
October 21, 2009 at 8:33 am
It's very strange that you don't get distinct values, there must be something different within the two records you posted.
Try grouping by SystemUser, I think this is what you are...
-- Gianluca Sartori
October 21, 2009 at 8:31 am
I don't like that script, does too many things behind the scenes.
Why not simply:
SELECT TOP 1 1 FROM remoteserver.dbname.dbo.sometable
or, even better if the remote server is SQL Server
SELECT TOP 1...
-- Gianluca Sartori
October 21, 2009 at 5:41 am
A few answers from these forums won't turn a wannabe DBA into a real DBA.
He had the job, so, why bother?
Now we may just hope he will study hard and...
-- Gianluca Sartori
October 21, 2009 at 5:34 am
Try this:
SELECT DISTINCT CONVERT(datetime, CONVERT(char(8),LoginTime,112), 112) AS [date], [Applicationtype], [SystemUser]
FROM DW.ServerLogonHistory
ORDER BY CONVERT(datetime, CONVERT(char(8),LoginTime,112), 112)
-- Gianluca Sartori
October 21, 2009 at 5:26 am
Yep.
Very easy to try, indeed.
-- Gianluca Sartori
October 20, 2009 at 8:27 am
Great idea, Gail.
I never have thought about that!
The main point, however, is that the piece of code (stored procedure, application code etc...) that requested the transaction to start is responsible...
-- Gianluca Sartori
October 19, 2009 at 8:13 am
Viewing 15 posts - 4,756 through 4,770 (of 5,393 total)