Viewing 15 posts - 316 through 330 (of 427 total)
declare @tbl table (
D_AC int not null,
D_RU int not null,
D_SBU int not null,
f00 int not null,
...
August 25, 2011 at 12:59 am
No there isn't any reason not to convert the addresses into binary(16) instead of varchar(39). It is just far more complicated to create a correct binary string using T-SQL. f.e....
August 24, 2011 at 11:28 pm
On the topic of performance on big xml files I can add some more tips.
- Don't ever use "back-references" (i.e. "..", "..." and such), these will bog everything down to...
August 24, 2011 at 9:00 am
Are you sure you need a totally dynamic parser for your data? In the cases I've seen so far, there were indeed -over time- changes in the format of files...
August 24, 2011 at 8:16 am
like this?
declare @xml xml;
select @xml = N'
<root>
<node attr1="1" attr2="2"/>
<parent attr3="3">
<node attr4="4" attr5="5"/>
</parent>
</root>
';
select a.a.value('local-name(.)','varchar(128)')
from @xml.nodes('/root/node') r(n)
...
August 24, 2011 at 6:38 am
Comparing IPv4 addresses using text comparisons only can be done by normalizing them as follows:
declare @ipv4 table (
ip varchar(15)
);
insert @ipv4 (ip)
select '206.84.71.241'
union all select '206.63.71.23'
union all select...
August 24, 2011 at 6:31 am
Attributes can be found using @*. So the names of these attributes can be found like this:
declare @xml xml;
select @xml = N'
<root>
<node attr1="1" attr2="2"/>
<node...
August 24, 2011 at 12:29 am
And a note on your example. I don't know if it was intentional but it seems you're getting the values from the elements a little to complicated: you don't need...
August 23, 2011 at 10:54 pm
B.t.w. in this post I gave some pointers on how to set up Kerberos delegation to make the openrowset function even more useful by making it read the documents from...
August 23, 2011 at 10:40 pm
I do know of a way to get the names of the available elements in the product element. But how to apply that to then retrieve those elements/attributes, that I...
August 23, 2011 at 10:29 pm
This seems like a double posting of this question. Shall we continue in the other thread?
August 22, 2011 at 6:40 am
A calendar table or a tally table (i.e. to generate a dynamic calendar table) would have been a lot easier.
And as a plus for these alternatives: if both periods...
August 22, 2011 at 3:40 am
Coming to think of it. Why don't you just "pad out" with zero's each component of the both ipv6 addresses, to "normalise" them and then do a string compare of...
August 21, 2011 at 11:14 pm
The comparison method doesn't work for IPV6. For IPV4 I already had to use bigints to hold a unique integer for each address, for IPV6 the number of addresses is...
August 21, 2011 at 10:59 pm
I don't know how this will work out for IPV6 addresses, but based on the idea of taking the bytes from the ip numbers and converting these into one int...
August 21, 2011 at 4:45 am
Viewing 15 posts - 316 through 330 (of 427 total)