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...
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...
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...
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...
October 26, 2011 at 11:36 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...
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.
October 26, 2011 at 9:24 am
BrainDonor (10/26/2011)
Ninja's_RGR'us (10/26/2011)
BrainDonor (10/26/2011)
October 26, 2011 at 9:19 am
Duplicate post.
Please post replies at: http://www.sqlservercentral.com/Forums/Topic1196314-1291-1.aspx
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?
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.
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...
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...
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...
October 26, 2011 at 7:21 am
Modify the query as follows:
SELECT @concat = STUFF((
SELECT ';' + value AS [text()]
...
October 26, 2011 at 7:19 am
Viewing 15 posts - 3,061 through 3,075 (of 14,953 total)