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.
N 56°04'39.16"
E 12°55'05.25"
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.
N 56°04'39.16"
E 12°55'05.25"
December 9, 2008 at 5:34 am
Two for the price of one
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=115751
N 56°04'39.16"
E 12°55'05.25"
December 5, 2008 at 4:35 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...
N 56°04'39.16"
E 12°55'05.25"
December 5, 2008 at 4:34 am
Which is easier than STUFF(REPLACE(STR(Col1, 4), ' ', '0'), 3, 0, ':')
N 56°04'39.16"
E 12°55'05.25"
December 3, 2008 at 3:09 am
I still can't see the reference to use only half the maximum number of processórs.
N 56°04'39.16"
E 12°55'05.25"
December 3, 2008 at 2:49 am
You can also add the WITH NOWAIT to the RAISERROR statement.
N 56°04'39.16"
E 12°55'05.25"
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?
N 56°04'39.16"
E 12°55'05.25"
December 3, 2008 at 2:28 am
If times are AM, use
STUFF(REPLACE(STR(Col1, 4), ' ', '0'), 3, 0, ':')
N 56°04'39.16"
E 12°55'05.25"
December 3, 2008 at 2:25 am
Same question asked and answered here
http://www.sqlservercentral.com/Forums/Topic610093-145-1.aspx
N 56°04'39.16"
E 12°55'05.25"
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
N 56°04'39.16"
E 12°55'05.25"
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...
N 56°04'39.16"
E 12°55'05.25"
November 27, 2008 at 3:45 am
Or use the DATABASEPROPERTY function like this
SELECTDATABASEPROPERTY('master', 'IsInRecovery')
N 56°04'39.16"
E 12°55'05.25"
November 27, 2008 at 3:19 am
N 56°04'39.16"
E 12°55'05.25"
November 25, 2008 at 3:31 pm
See my article here about how to work with DATEDIFF function
N 56°04'39.16"
E 12°55'05.25"
November 25, 2008 at 3:33 am
Viewing 15 posts - 601 through 615 (of 2,171 total)