Forum Replies Created

Viewing 15 posts - 316 through 330 (of 427 total)

  • RE: transpose data

    declare @tbl table (

    D_AC int not null,

    D_RU int not null,

    D_SBU int not null,

    f00 int not null,

    ...

  • RE: comparing ip addresses in sql

    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....

  • RE: Automatic XML

    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...

  • RE: Automatic XML

    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...

  • RE: Automatic XML

    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)

    ...

  • RE: comparing ip addresses in sql

    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...

  • RE: Automatic XML

    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...

  • RE: Automatic XML

    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...

  • RE: Automatic XML

    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...

  • RE: Automatic XML

    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...

  • RE: Can I create Email Trigger that compares column value in inserted row with value in another table?

    This seems like a double posting of this question. Shall we continue in the other thread?

  • RE: compare data for each date

    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...

  • RE: comparing ip addresses in sql

    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...

  • RE: comparing ip addresses in sql

    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...

  • RE: comparing ip addresses in sql

    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...

Viewing 15 posts - 316 through 330 (of 427 total)