Viewing 15 posts - 3,016 through 3,030 (of 5,504 total)
rscavilla (8/11/2010)
;with xmlnamespaces(default 'urn:hl7-org:v3')
select Labelid,
LabelXml.value('(/document/title)[1]', 'varchar(50)') AS 'Title',
LabelXml.value('(/document/effectiveTime)[1]/@value', 'varchar(50)') as effectiveTime
My issue now is unfamiliarity with the...
August 11, 2010 at 7:43 am
Please provide all table defs including all indexes on those tables as well as the actual execution plan for the query. You've been around long enough to know how to...
August 11, 2010 at 7:30 am
please provide the sample xml data in total, not only the first line.
You'll need to use WITH XMLNAMESPACES() together with your select statement, and maybe you'd need to add the...
August 11, 2010 at 5:17 am
Glad I could help 😀
Would you mind sharing the performance difference for the solution you used before vs. the one I provided? Just being curious...
August 11, 2010 at 5:06 am
Please provide table def and sample data so we have something to test against.
Also, please show us what you've tried so far.
August 11, 2010 at 5:04 am
ColdCoffee (8/10/2010)
LutzM (8/10/2010)
@ColdCoffee
:Sorry for sending you in the wrong direction!
Not at all, Lutz. I already coded the sample data with IDENTITY column , so that i will get a ROW...
August 11, 2010 at 5:00 am
With your current design it's close to impossible (unless you're going to use some delimited strings): you have two variables (@SortBy and @SortDirection) and you want to have more than...
August 10, 2010 at 3:51 pm
Even though I have no idea what value you want to store in the DescriptionID column nor do I have a clue as how you'd calculate the number to be...
August 10, 2010 at 3:42 pm
GilaMonster (8/10/2010)
August 10, 2010 at 2:42 pm
Drew,
I guess the Row_Number approach I was hitting for was overdesigned for the task...
You're absolutely right, for the given task a simple join on the time columns would be enough.
That's...
August 10, 2010 at 1:06 pm
You would need to use ROW_NUMBER() to put your data in sequence and do a self join on this subquery (or better, CTE) based on the row number column with...
August 10, 2010 at 11:22 am
I would use CrossTab over PIVOT due to more flexibility:
;
WITH cte AS
(
SELECT
RP.PERIODNAME,
[1.1] = COUNT(CASE WHEN C.CASETYPE = 'F' AND C.PROPERTYTYPE = 'P' AND RIGHT(C.IRN, 2) = 'PA' AND CE.EVENTNO =...
August 10, 2010 at 11:14 am
PIVOT isn't really that great of a tool if you either have to pivot by more than one column or if your target columns aren't fixed.
You should have a look...
August 9, 2010 at 1:46 pm
bitbucket-25253 (8/9/2010)
... teaching him you catch more flies with honey than vinegar?
:-D;-):-D
I don't think that's actually true: That's how we get rid of fruit flies:
1/2 shot glass cider vinegar,
1/2 shot...
August 9, 2010 at 1:20 pm
Please have a look at the TallyTable article referenced in my signature.
Once you have such a table it's as easy as
SELECT @start + N
FROM Tally
WHERE N <= (@end - @start)
(You...
August 9, 2010 at 1:00 pm
Viewing 15 posts - 3,016 through 3,030 (of 5,504 total)