Forum Replies Created

Viewing 15 posts - 4,171 through 4,185 (of 14,953 total)

  • RE: String Concatenation of Data to Third Party App using FOR XML PATH

    Remember to add in IsNull/Coalesce around the columns in the inner query. Otherwise you'll be missing columns in the output string for some rows.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Invalid length parameter passed to the SUBSTRING function

    It has ampersands in the data. There needs to be a replace step to clean it into real XML.

    Whomever designed the database he's using, they made a number of...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Help with a SET based solution to multiple bets

    Here's a skeleton that should get you started. You should be able to see how the rules work in it and customize them as you see fit.

    /*

    Horse Name Ranking...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: What is a good SQL Server strategy for copy/move database tables between two location in different networks?

    My first instinct on reading the title and intial requirement statement was to suggest snapshot replication.

    However, for something twice a month, I'd suggest a simple SSIS package, or even a...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Invalid length parameter passed to the SUBSTRING function

    Do it in two steps.

    Parse out the value, into a temp table or a variable, then convert it to datetime.

    Or skip all that and use XQuery as per my example....

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Database Attach problem

    Pretty safe assumption you've already resolved this, but if not, what is blocking and what is eating up resources?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: String Concatenation of Data to Third Party App using FOR XML PATH

    Kit G (6/1/2011)


    Hi Wayne,

    Thanks for the reply but that doesn't quite answer my question. The code works. What I'm trying to figure out is WHY it works so...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: String Concatenation of Data to Third Party App using FOR XML PATH

    On the other question about XML escape characters in the results (the & amp bit), you'll need to (a) wrap your fields in IsNull or Coalesce functions to make sure...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: String Concatenation of Data to Third Party App using FOR XML PATH

    Kit G (6/1/2011)


    Before I use this construction, I want to understand what I’m doing. So, plucking that out of the CTE, I try this snippet of code

    declare @BatchSize...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: INSERT IF NOT EXISTS

    It looks like a Select with an Outer Join should do what you need.

    select pin, Rule.Date

    from [Pins]

    cross join [Rule]

    left outer join [Registry]

    on [Pins].Pin = [Registry].Pin

    and [Rule].Date = [Registry].Date

    where [Registry].Date is...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Strange "multi-part identifier could not be bound" error; "select" works but "insert" doesn't

    Is there a trigger on the table you're trying to insert into?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: dynamic sql

    WayneS (5/31/2011)


    Hi GSquared,

    This is meant to be run one time to create the procs, that are then used to get the data. Of course, they need some modifications to add...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Can this be converted to a set based query?

    LutzM (5/31/2011)


    GSquared (5/31/2011)


    ...GSquared, OEC, FEBC, HDA, RSVP, OODA, MAP, NMVP, ARCSW, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ETC

    Gus, you didn't take...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Does anyone know why this wouldn't work?

    The question becomes, if more than one row qualifies to fire the trigger, do you send more than one e-mail, or will one e-mail accomplish what you need? What...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Are the posted questions getting worse?

    Craig Farrell (5/31/2011)


    GSquared (5/31/2011)


    jcrawf02 (5/31/2011)


    Actually, the real acronym is almost funnier than the ones you guys came up with, when used on a forum:

    Do Not Resuscitate

    We should put that on...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 4,171 through 4,185 (of 14,953 total)