Forum Replies Created

Viewing 15 posts - 2,281 through 2,295 (of 4,080 total)

  • RE: create table

    "Not able to create" is a little vague. Specifics please... 🙂

    Does the "New Table" option appear when you right click? If not,...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Are the posted questions getting worse?

    That one is a winner alright.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Nested Case statement

    Maybe. It all depends.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: How to open XML file from a website using xp_cmdshell

    All xp_cmdshell does is launch code outside of SQL.

    From Books Online:

    xp_cmdshell (Transact-SQL)

    Spawns a Windows command shell and passes in a string for execution. Any output is returned as rows...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Are the posted questions getting worse?

    But I thought the frozen ones hurt more, Jeff. 😛

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Are the posted questions getting worse?

    I guess my question is: If you see an answer that you think misses the mark, why you don't just go ahead and answer it as you see fit?...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: How to open XML file from a website using xp_cmdshell

    Please don't post multiple times. Also, adding URGENT doesn't accomplish anything. This is a free forum whose participants volunteer to help each other out. It...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: un-pivot feature applying

    Yes, and it gets the job done with only one pass through the source table.

    -- unpivot only

    SELECT Customer,Shop

    ,max(case when [AM/PM] = 'AM' then PCT else null end) as AM

    ,max(case...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: preferring Set based operations

    Really good point. Thanks for the heads up, BB.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: un-pivot feature applying

    No promises about performance with this solution.

    declare @sample table (Customer char(5), [AM/PM] char(2), ShopA int, ShopB int, ShopC int)

    insert into @sample

    select 'Cust1','AM',10, 15, 25 union all

    select 'Cust1','PM',30, 10, 20 union...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: preferring Set based operations

    You can also find it online through a web browser at:

    http://msdn.microsoft.com/en-us/library/ms130214.aspx

    Trudye, just to be clear. If you switch to using OUTPUT, I wouldn't bother with IF EXISTS at...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Are the posted questions getting worse?

    I know what you mean, Jeff. Fortunately in this , the OP came back with their own solution which they were working on while I was answering.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: preferring Set based operations

    Good for you, Trudye. 🙂

    Two hints for the future:

    I notice you are saving "before" images of the rows which will be updated. You might want...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Are the posted questions getting worse?

    Makes sense.

    Hope you didn't mind my taking pity on the OP who didn't have a clue about how to do a set-based UPDATE. ...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: preferring Set based operations

    -- set up sample data (this will be your job next time)

    declare @sample table (string varchar(40))

    insert into @sample

    select 'Apples' union all

    select 'Bananas' union all

    select 'Coconuts' union all

    select 'Paradimethylaminobenzaldehyde'

    -- view...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

Viewing 15 posts - 2,281 through 2,295 (of 4,080 total)