Forum Replies Created

Viewing 15 posts - 31 through 45 (of 167 total)

  • RE: Get SQL Server IP Address

    If you're running SQL Server 2005 or above you can use this (some shops disable xp_cmdshell):

    Select

    client_net_address,local_net_address

    from sys.dm_exec_connections

    where session_id=@@SPId;

    Limitation: You only get IP addresses if you're connective via...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: help with xp_cmdshell 'XCOPY....' command

    Microsoft says a lot of things about their Command Prompt/DOS emulation environment, some of which is conflicting... From my experience the code presented in my previous post will work under...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: help with xp_cmdshell 'XCOPY....' command

    I agree with Jeff on the xp_CmdShell issue. With proper server security (proxy account) its not an issue.

    xp_CmdShell can be very handy when processing data, however, DOS mode or Command...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: T-SQL

    Note:

    insert into #test values (2,'D'),('','E') is equal to insert into #test select 2,'D' union select '','E'

    Actually, its like:

    insert into #test values (2,'D'),('','E') is equal to insert into #test select...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: Capturing XML output from a Stored Procedure

    Dude, you rock! I totally missed that in BOL... But I'm still not going to take back the MICROSOFT @)(@#$)(*@#$#@$...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: Capturing XML output from a Stored Procedure

    MICROSOFT @#$(*&@#$(*%&@#$... the saga continues...

    One other thing... When you code:

    Select (Select 1[Number] for XML Path('root'))

    the output result type is character! I recoded, again, to the following:

    Select Cast((Select 1[Number] for XML...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: Capturing XML output from a Stored Procedure

    MICROSOFT @(*&#$%)(*@#$...

    I've recoded my original sproc with the above change to the XML output SELECT statement and am now able to insert it's output into a table with an XML...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: Capturing XML output from a Stored Procedure

    Just figured this out to some degree. If you code:

    if object_id('tempdb.dbo.#tmp') is not null drop table dbo.#tmp;

    create table dbo.#tmp(x xml);

    insert dbo.#tmp

    select 1 [Number] for xml path('root')

    it will fail with Msg...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: Capturing XML output from a Stored Procedure

    Thanks Crazy Eights, I too can make your example work in SSMS but when I replace your simple sproc with the one from my shop I get the following error...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: What's in your CLR?

    Custom aggregators...

    bit-wise aggregation; OR, AND, XOR...

    string aggregation; deduped concatenation, longest string, shortest string, longest left/right most match,...

    intelligent date/time aggregation

    XML aggregation

    ...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: uniqueidentifier

    You can also assign a UniqueIdentifier by casting from a VarBinary data type.

    Select Cast(Cast(1 as VarBinary(16)) as UniqueIdentifier)

    Play around with the VarBinary size and the integer being cast and see...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: Moving Day

    I have been in this business for many years and am constantly exposed to this behavior. I've witnessed it's beginnings and progress to the "art form" status it receives today.

    The...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: Moving Day

    Wow... you guys are extremely caustic... its a wonder any bother to post here anymore. I made a simple comment regarding how we use a facility. Take it or leave...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: Moving Day

    We use extended attributes to track things of interest to us like deprecation and TTL (time to live) on SQL objects...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • RE: A Release from Data

    Sparring and competition are my favorite martial arts expressions too!

    You can talk about programming all day long (blogging). If you really want to know if you can do it, write...



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

Viewing 15 posts - 31 through 45 (of 167 total)