Viewing 15 posts - 706 through 720 (of 1,439 total)
This will give you a new row for each XML FormItem element.
SELECT TicketAssessors.Name AS [Assessors Name], TicketAssessors.Designation AS [Assessors Designation],
...
December 1, 2011 at 4:39 am
kev43barrie (12/1/2011)
Can this be done within a select statement with out creating a function?
Very likely. You'll need to post more details though.
December 1, 2011 at 4:22 am
These will be returned as NULLs in the query. Have you tried it?
December 1, 2011 at 3:58 am
See if this helps
DECLARE @T TABLE(ID INT, XMLCol XML)
INSERT INTO @T(ID,XMLCol)
VALUES(1,
'<ArrayOfFormItem xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<FormItem>
<ControlId>Club_Licensed</ControlId>
<ItemValue>y</ItemValue>
<ItemText>Yes</ItemText>
</FormItem>
...
December 1, 2011 at 3:39 am
Naomi N (11/30/2011)
01/01/2010 - 01/15/2010
01/16/2010 - 02/10/2010
The above two...
November 30, 2011 at 7:48 am
jjzzmp (11/29/2011)
Dear Mark-101232,This is a great help, thank you very very much!
Kind regards,
John
You're welcome!
November 29, 2011 at 5:29 am
Try this
DECLARE @x XML
SET @x=@invoer
SELECT r.value('1+count(for $a in . return $a/../ *[. << $a])','int') AS nr,
r.value('(./customernumber)[1]','VARCHAR(15)') AS customernumber,
...
November 28, 2011 at 10:18 am
ken-1133369 (11/24/2011)
Thanks very much Mark.I got close but had the case END in the wrong place
CASE LineType WHEN 1 THEN (StockCode as [StockLine/StockCode])
ELSE (Comment as [CommentLine/Comment]) END,
Your's works perfectly!:-):-)
Thanks...
November 24, 2011 at 7:25 am
Is this what you're after?
select XOrder as [OrderHeader/XOrder],[CustomerPoNumber] as [OrderHeader/CustomerPoNumber],
Customer as [OrderHeader/Customer],
CONVERT(VARCHAR(10),OrderDate,120) as [OrderHeader/OrderDate],
CONVERT(VARCHAR(10),RequestedShipDate,120) as [OrderHeader/RequestedShipDate],
(Select
(select case when LineType = 1 then CustomerPoLine end as...
November 24, 2011 at 6:49 am
November 24, 2011 at 4:55 am
Can you post some sample data for the source tables?
November 24, 2011 at 4:19 am
This sort of construct won't work
IF 'abc' in (@Selection) -- If abc is in @selection then we are taking bank
You could try
IF @Selection LIKE '%,abc,%'
instead
November 23, 2011 at 9:54 am
I think this is known as a directed graph
DECLARE @Start VARCHAR(50)
DECLARE @End VARCHAR(50)
DECLARE @MaxLevels INT
SET @Start='G9'
SET @End='BIN200'
SET @MaxLevels=7;
WITH CTE AS (
SELECT c.DeviceID AS Start,CAST(d.DeviceName AS VARCHAR(1000)) AS Path, c.ConnectedDeviceID, 1...
November 22, 2011 at 7:55 am
What are your expected results?
See if this helps
WITH CTE AS (
SELECT [Date],StaffId,ClientId,
ROW_NUMBER() OVER(PARTITION BY StaffId,ClientId ORDER BY [Date]) AS rn
FROM dbo.Visits)
SELECT a.StaffId,a.ClientId
FROM CTE...
November 17, 2011 at 4:31 am
Cadavre (11/14/2011)
Mark-101232 (11/14/2011)
What XML are you trying to generate?
Let me start again, because I'm sure that I'm attempting to over-complicate this with my lack of XML knowledge.
Take this XML: -
<Message>
...
November 15, 2011 at 7:47 am
Viewing 15 posts - 706 through 720 (of 1,439 total)