Viewing 15 posts - 16 through 30 (of 388 total)
Here is a simple example:
DECLARE @xml XML
SELECT @xml = '<employee name="jacob"/>'
SELECT * FROM XMLTable(@xml)
WHERE NodeType = 'attribute'
June 30, 2010 at 3:01 am
Yes, you can also query attributes.
June 30, 2010 at 1:55 am
The syntax is not correct. The correct expression is [position()=sql:variable("@var")]. Here is an example:
DECLARE @x XML, @cnt INT
SELECT @x = '
<a>
<n>node 1</n>
<n>node 2</n>
<n>node 3</n>
</a>'
SELECT...
June 9, 2010 at 7:57 am
When you have multiple schemas associated with a column, the validation will succeed if the value is good with any of the schemas in the schema collection.
You an index an...
June 8, 2010 at 9:42 pm
Please post a small repro script that shows your problem.
June 8, 2010 at 9:03 pm
I think Matt has put forward a very interesting point. Not being an web developer, I did a Google search and found this thread which talks about a similar approach....
June 3, 2010 at 11:29 pm
I do not insist that you 'should' do a scan of the FILESTREAM data. As MSDN (link posted by gail) says, if it is 'necessary' do it, if not 'do...
June 3, 2010 at 9:23 am
SQL Server 2005 does not have such a data type. SQL Server 2008 has added the 'FILESTREAM' feature, which is not a data type, but a new attribute to a...
June 3, 2010 at 5:41 am
Glad to know it helped. You are right, most people find it bit difficult when they start working with XML..but that will go away soon.
May be the XQuery workshops can...
June 3, 2010 at 5:33 am
How about this?
DECLARE @x XML
SELECT @x = '
<salesOrder orderNumber="100001" customerNumber="JAC001" orderDate="01-01-2007">
<lineItems>
<item itemNumber="A001" qty="10" rate="10.5" />
<item itemNumber="A002" qty="20" rate="11" />
<item itemNumber="A003" qty="30" rate="13" />
</lineItems>
</salesOrder>
<salesOrder orderNumber="100002" customerNumber="JAC002" orderDate="01-01-2008">
<lineItems>
<item itemNumber="A004" qty="60" rate="15.5" />
<item...
June 3, 2010 at 5:08 am
I think it is a good idea that the anti virus software is configured to scan the FILESTREAM files. However, you need to make sure that if an infected file...
June 2, 2010 at 12:06 am
The 'WHY' part is still a mystery and one possible reason could be the way SNAPSHOT isolation works. Under snapshot isolation level, your transaction should be able to read a...
May 30, 2010 at 1:03 am
Just wanted to add that there is a follow up article on this, which explains how to do the same using the table valued parameters introduced in SQL Server 2008....
April 26, 2010 at 4:49 am
try this
SELECT (
select
*,
(
select * from account a
where a.business_id = b.business_id
for xml path('account'), root('accounts'), type
)
from business b
for xml path(''), root('Small_Business'),TYPE
)
FOR XML PATH('Business_Type'), ROOT('XMl')
April 20, 2010 at 8:41 pm
Viewing 15 posts - 16 through 30 (of 388 total)