Forum Replies Created

Viewing 15 posts - 11,446 through 11,460 (of 14,953 total)

  • RE: How to return multiple values of XML child Nodes

    Here's what I did:

    declare @XML XML

    select @XML = '(Your XML String)'

    SELECT A.node.value('(Partner)[1]', 'varchar(50)') AS Target,

    A.node.value('(Feed_ID)[1]', 'varchar(50)')

    FROM @XML.nodes('/Atd_Order_Row_Data/Dealer_Export/Dealer_Stock_Export') AS A(node)

    That got the result you need.

    The change is taking the last bit...

    - 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: Would love some help in redefining a "process"

    It would look something like this:

    ;with

    Demos

    (Source, ContactID, MRN, FName, MI, LName, Address1, Address2,

    City, State, Zip, HomePhone, WorkPhone, CellPhone)

    as

    (select 'Demographics', null, MRN, FName, MI, LName, Address1, Address2,

    City,...

    - 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: Get count of each ID in query

    Take a look at "Row_Number" in Books Online and see if that will get you what you want. If not, then a sub-query that uses the Count() function should...

    - 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: Questions on looping and grouping data

    What SQL statement do you have so far? From the requirements, it looks like it should just be a Select with an input parameter used in the Where clause.

    - 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: Add users programmatically

    My suggestion is get domain groups set up and add them, instead of individual accounts. That's usually MUCH faster and easier to manage.

    - 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: How to return multiple values of XML child Nodes

    I don't have time to turn that back into valid XML right now, but if you could post the XML in a text file attached to a post, I can...

    - 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: Replace things with code type it in URL

    I think you're on the wrong website to get what you want. This website is about Microsoft SQL Server. You're looking for something about PHP and MySQL doing...

    - 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: Hidden RBAR: Triangular Joins

    As an addendum on the point of Sharepoint, et al: Have you tried refactoring the databases to test overall performance and operation with the missing indexes, non-RBAR, etc., all fixed?

    Keep...

    - 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: Hidden RBAR: Triangular Joins

    TheSQLGuru (1/20/2009)


    GSquared, I think you are off-base on many fronts.

    1) Again, just because someone can't or won't design/write optimal software does not mean he/she should not be working...

    - 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: Best performance Row by row loop (SQL2K)

    I just tested it with:

    create table dbo.Test1 (

    ID int identity primary key,

    Col1 varchar(100),

    Col2 varchar(100),

    Col3 varchar(100));

    go

    insert into dbo.test1 (col1, col2, col3)

    select 'Char1'+char(1), 'NoChar', 'NoChar' union all

    select 'NoChar', 'Char2'+char(2), 'NoChar' union all

    select...

    - 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: Hidden RBAR: Triangular Joins

    Another point that occurs to me on this: Who's going to do better in the market, the guy who gets buggy software out the door first, and takes years...

    - 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: SQL Server Architecture? What's going on behind the scenes?

    I'm going with he wants to know about the pages, extents, et al, but, like everyone else who isn't the person who asked the question, I'm guessing.

    - 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: Would love some help in redefining a "process"

    Union works like this:

    select x,y,z

    from dbo.Table1

    UNION

    select a,b,c

    from dbo.Table2

    The details are in Books Online, but, simply put, it puts two data-sets on top of each other, and gets rid of duplicates....

    - 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: Updating a date in XML with xquery

    Look up "modify() method" in Books Online. It has directions on updating XML data.

    Edit: Actually, just took another look at it, and it's pretty sparse. Check out...

    - 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: Would love some help in redefining a "process"

    The base-problem is the database design. You shouldn't have contact data in the patients table. It should all be in one place, with a foreign key to connect...

    - 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 - 11,446 through 11,460 (of 14,953 total)