Viewing 15 posts - 106 through 120 (of 427 total)
Almost. But the written request does not match the requested output (this is exactly why we always ask for example output) : the group by should be on caseid AND...
June 3, 2012 at 12:55 am
Have you tried reducing the 4 updates into a single one, possibly even using the merge statement to do any needed insert/delete actions in one single pass too?
And what sort...
June 1, 2012 at 7:02 am
One thing I see hardly addressed in SSRS is translations. i.e. provide the same data to different users in the same layout but all fixed texts on the report are...
June 1, 2012 at 6:18 am
dwain.c (5/24/2012)
Mark-101232 (5/24/2012)
WITH CTE AS (
SELECT row.value('local-name(.)', 'VARCHAR(50)') AS name
,row.value('text()[1]', 'VARCHAR(50)') AS...
May 25, 2012 at 12:18 am
Of course the xml should be improved on for any practical implementation, but still this challenged me. Since this is hypothetical already and on top of that Mark is in...
May 24, 2012 at 7:44 am
You've effectively reduced your chances on getting the answer you need to 50% by putting the actual question and the data with it in an attachment: Your question has had...
May 23, 2012 at 12:55 pm
Mark-101232 (5/23/2012)
select p.p.value('1+count(for $a in . return $a/../*[. << $a])','int') as parentID,
p.p.value('@name','varchar(10)') as parentName,
c.c.value('1+count(for $a in . return...
May 23, 2012 at 5:54 am
And your point is? Because the output of your query is:
<test>
<value1>A</value1>
<value2>B</value2>
</test>
Which is not the same as the required output:
<test>
<value>A</value>
<value>B</value>
</test>
May 23, 2012 at 3:52 am
The workaround suggested by Microsoft is to put a zero-length string in between the both elements:
select
null [value],
'',
null [value]
for xml path('test'), type, elements xsinil
which produces:
<test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<value xsi:nil="true" />
...
May 23, 2012 at 3:20 am
Yeah, that was my workaround too. But I still think it is a bug though. I've reported it on connect: http://connect.microsoft.com/SQLServer/feedback/details/742314/for-xml-path-concatenates-elements-with-the-same-name. Please vote it up if you also think it...
May 16, 2012 at 4:05 am
njdevils39 (5/7/2012)
...
Ok, now it works fine for every employee. But can you tell me if you can, how to do it with this code:
ALTER PROCEDURE [dbo].[WEB_HR_GetRateHistory]
(
@ORG_LEVEL_ID INT,
@EMP_ID INT
)
AS
BEGIN
DECLARE @x XML;
...
May 7, 2012 at 1:52 pm
njdevils39 (5/2/2012)
ALTER PROCEDURE [dbo].[WEB_HR_GetRateHistory]
(
@ORG_LEVEL_ID INT,
@EMP_ID INT
)
AS
BEGIN
DECLARE @x XML;
CREATE TABLE #RATE_HISTORY
(
EMP_NAME...
May 3, 2012 at 4:44 am
I don't have a script to identify the rights one specific user/login has, but I do have this script that scripts out all rights defined per object (if run by...
May 1, 2012 at 3:15 am
Something like this?
with cteRates as (
select o.emp_id,
row_number() over (partition by o.emp_id order...
April 27, 2012 at 4:59 pm
ryan.betker (4/27/2012)
Great article, Chuck. ...
@ryan-2: You're wrong and have clearly not read any of the other comments posted already. Better alternatives have been presented and your additions have...
April 27, 2012 at 4:11 pm
Viewing 15 posts - 106 through 120 (of 427 total)