Viewing 15 posts - 3,061 through 3,075 (of 14,953 total)
Not too surprising, on the Denali deodorant.
"Denali" is the Athabaskan name for Mt McKinley in Alaska, and means "The High One". (Which could be taken all kinds of amusing...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 12:11 pm
The submenu XML column isn't named. That's what's causing the error. Can't have an unnamed column in an XML query.
Add something like "AS Submenu" after the close-parentheses for...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 11:46 am
Without tables involved, it's procedural code either way you slice it.
I find the Case version more readable, but that's a personal opinion, not something that can be backed up with...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 11:40 am
You don't need to truncate a log file if you back it up.
Per MSDN:
Note
After a typical log backup, some transaction log records become inactive, unless you specify WITH...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 11:36 am
You're welcome.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 11:18 am
And, theoretically, if you turn notifications back on automatically due to a successful run, you'd probably want to send an e-mail alerting you to that. "Alerts re-activated after successful...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 11:17 am
The way you did is just fine.
The T-SQL Pivot function is nearly useless, in my opinion. Don't bother with it.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 9:24 am
BrainDonor (10/26/2011)
Ninja's_RGR'us (10/26/2011)
BrainDonor (10/26/2011)
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 9:19 am
Duplicate post.
Please post replies at: http://www.sqlservercentral.com/Forums/Topic1196314-1291-1.aspx
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 8:20 am
How does the table tell the query which one goes first, which one goes second? Will there ever be a third, fourth, et al?
Or does the sequence not matter?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 8:19 am
Ping each server first.
Then, if up, check the state of the SQL service. You can do this through WMI.
Then check database statuses.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 8:16 am
Ninja's_RGR'us (10/26/2011)
You might as well insert the 10 parameters in the tvp (without bothering with ifs) and then use where value is not null in the concat function.
If you use...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 8:06 am
Sample of TVP-use:
USE ProofOfConcept;
GO
CREATE TYPE TVPtest AS TABLE (Val VARCHAR(100));
GO
CREATE FUNCTION dbo.ConcatString
(@Vals_in AS TVPtest READONLY)
RETURNS VARCHAR(1000)
AS
BEGIN
RETURN STUFF((SELECT ';' + Val
FROM @Vals_in
FOR XML PATH(''), TYPE).value('.[1]','varchar(1000)'), 1, 1, '');
END;
GO
DECLARE @Vals AS...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 7:35 am
As far as a variable number of parameter values, if you're actually on SQL 2008, as suggested by the forum this question is in, have you looked into Table Value...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 7:21 am
Modify the query as follows:
SELECT @concat = STUFF((
SELECT ';' + value AS [text()]
...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 26, 2011 at 7:19 am
Viewing 15 posts - 3,061 through 3,075 (of 14,953 total)