Viewing 15 posts - 601 through 615 (of 2,171 total)
I have a function where I call "sp_who2" and take database and username as parameters to the function.
Works great.
December 10, 2008 at 12:21 am
It CAN be done if you use OPENROWSET with a loopback linked server.
If you should is another question.
December 9, 2008 at 5:34 am
Consider this
DECLARE@Sample TABLE
(
id INT,
type VARCHAR(20),
name VARCHAR(20),
parent_id INT
)
INSERT@Sample
SELECT 0, 'root', 'root', nullUNION ALL
SELECT 1, 'account', 'Fred Jones', 10 UNION ALL
SELECT 2, 'account', 'Lisa...
December 5, 2008 at 4:34 am
Which is easier than STUFF(REPLACE(STR(Col1, 4), ' ', '0'), 3, 0, ':')
December 3, 2008 at 3:09 am
I still can't see the reference to use only half the maximum number of processórs.
December 3, 2008 at 2:49 am
You can also add the WITH NOWAIT to the RAISERROR statement.
December 3, 2008 at 2:31 am
What about setting the cost threshold for parallellism at server level?
Where is the reference to your suggestions?
December 3, 2008 at 2:28 am
If times are AM, use
STUFF(REPLACE(STR(Col1, 4), ' ', '0'), 3, 0, ':')
December 3, 2008 at 2:25 am
Same question asked and answered here
http://www.sqlservercentral.com/Forums/Topic610093-145-1.aspx
November 29, 2008 at 1:45 am
Try this trigger
CREATE TRIGGER dbo.trgZeroUnique ON dbo.Table1
AFTERINSERT,
UPDATE
AS
IF EXISTS (SELECT eMail FROM Table1 GROUP BY eMail HAVING COUNT(*) > 1 AND MIN(ID) > 0)
BEGIN
ROLLBACK TRANSACTION
RAISERROR('Duplicate eMail found.', 16, 1)
END
November 28, 2008 at 1:12 am
My $0.02 input.
I think OP is one join from solving the unified field theory. The query is 19852 characters.
The query returns 290 columns and joins 62 tables. Under these cirumstances...
November 27, 2008 at 3:45 am
Or use the DATABASEPROPERTY function like this
SELECTDATABASEPROPERTY('master', 'IsInRecovery')
November 27, 2008 at 3:19 am
See my article here about how to work with DATEDIFF function
November 25, 2008 at 3:33 am
Viewing 15 posts - 601 through 615 (of 2,171 total)