Viewing 15 posts - 376 through 390 (of 5,504 total)
I don't understand why values of a column would need to be translated into tag (or element) names without any text value, especially if the values contain invalid character for...
October 16, 2013 at 11:22 am
If you need to update the table, then the question is: what rules do apply?
The table is already defined as requested ("IsValidSap (should have null defined when adding to the...
October 15, 2013 at 4:09 pm
I'm not sure why those character wouldn't be properly displayed.
I tried
select NAME as a from @XMLTest for XML PATH('')
and received
<a>One¬d¦Uº</a>
<a>Two</a>
<a>Three</a>
So I don't think there's any need to replace...
October 15, 2013 at 3:51 pm
October 15, 2013 at 3:43 pm
Well, your DBA is absolutely right "that it (a TRY-CATCH block) is a very inefficient way of creating a transaction". 🙂
I also agree, that it therefore should not be...
October 15, 2013 at 2:22 pm
I'm not sure if I follow you completely.
By referring to "700+ corresponding database users" do you mean DomainA\Agents, DomainB\Agents and 698 more "users" (= domain groups)?
If so, I'd say there's...
October 15, 2013 at 10:00 am
ankit.gupta1 (10/15/2013)
Here in the table t2 there may be any number of rows...
October 15, 2013 at 9:46 am
J Livingston SQL (10/14/2013)
SELECT DATEPART(mm, OrderDate) AS MonthNum, AVG(orderCount) AS AvgOrderCount
FROM OrderTest
GROUP BY DATEPART(mm, OrderDate), DATEADD(mm, DATEDIFF(mm, 0, OrderDate), 0)
ORDER BY DATEADD(mm,...
October 14, 2013 at 3:36 pm
You might want to look into PIVOT (or CrossTab, as referenced in the related link in my signature).
October 14, 2013 at 3:29 pm
Yep, you're correct.
That's one of the pitfalls when not seeing the complete date - I totally missed the sort order. Sorry.
October 14, 2013 at 3:27 pm
Something like this (I used a cte to get a sort criteria added to the group by statement that is omitted in the final output)?
WITH cte as
(
SELECT datepart(mm,OrderDate) MonthNum,AVG(orderCount) AvgOrderCount,...
October 14, 2013 at 3:19 pm
ScottPletcher (10/14/2013)
...You would have to use a trigger to prevent sa activity....
Every sa could disable the trigger and still perform updates.
Whatever concept is applied, a system admin can change it...
October 14, 2013 at 3:14 pm
What is your expected output if we'd add another row like INSERT INTO OrderTest VALUES('2011/11/17',11) ?
Your current query only aggregate by month, so the above value will be added to...
October 14, 2013 at 2:55 pm
Here's a cte based solution.
But, as already mentioned, this query is everything but efficient and clean code.
From my point of view there are three options:
a) get the MONTHY column into...
October 14, 2013 at 2:42 pm
Your sample data and your expected output don't seem to match please clarify
a) Why not my phone 1 1 1 and my phone 1 1 1?
b) Why isn't "your"...
October 14, 2013 at 11:09 am
Viewing 15 posts - 376 through 390 (of 5,504 total)