Forum Replies Created

Viewing 15 posts - 6,406 through 6,420 (of 14,953 total)

  • RE: Please Help - Join 3 tables

    Joins can connect as many tables as you like (up to about 32,000 if I remember correctly). The connections can be as simple or complex as you like. ...

    - 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: Discarding records whith date gaps

    See if this will do what you need:

    SELECT

    1 AS ID,

    1 AS clientID,

    CAST('2008-11-05 00:00:00' AS DATETIME) AS enrolldate,

    ...

    - 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: XML with PrimaryKey values to delete rows in database table at a time

    Try using XQuery instead of the older methods.

    DECLARE @doc XML;

    SET @doc ='<NewsDTO>

    <NewsId>A4C13A4A-2350-4D21-AB06-9E2946182D39</NewsId>

    <NewsId>A3613580-99C3-489D-9988-92E5F24BC8F7</NewsId>

    <NewsId>F934D9F9-A73F-4ACF-B225-8A0ED7BAF8C4</NewsId>

    </NewsDTO>';

    SELECT Doc.Nodes.query('.').value('(/NewsId/text())[1]','varchar(100)')

    INTO #temp

    FROM @doc.nodes('/NewsDTO/NewsId') Doc(Nodes);

    - 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: Table create was skipped, but still got warning saying it was created.

    Makes sense, and you're welcome.

    - 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: time and % data datatype

    laddu4700 (10/25/2010)


    I tried to use both float and numeric(4,2), but failed get 74.64(eg:)

    with float, I got this

    0.746428571428571

    with numeric, I got this

    0.74

    Expand the numeric to 6,4. Have the front end...

    - 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: time and % data datatype

    da-zero (10/26/2010)


    If you really want to keep your % sign, then you'll have to import it as strings.

    Bad idea!

    First, you won't be able to query it mathematically. Second, formatting...

    - 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 with no triggers

    Something I just thought of: Triggers don't usually fire for bulk inserts. Can you test importing from a text file using a bulk import method? Might seem silly...

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

    Jeff Moden (10/24/2010)


    Wow... thanks for the insight on SSIS, folks. I've mostly resisted spending any decent amount of time on it because of what I've seen. Thanks to...

    - 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 Limit per Lun? - from Newbie

    SQL just sees a LUN as a drive, so the only limits are the same ones as for a drive of any sort. So, you pretty much have 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: Transaction log path - SQL 2008 Copy Database Wizard

    Would it be easier to back up the databases, and then generate a restore script that puts the files where you want them?

    - 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 multiple records from one row

    Jinx! 🙂

    - 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: time and % data datatype

    Float is more likely to keep it in the format that Excel uses, but that also has some issues.

    - 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: Please Help - Join 3 tables

    Yeah, that's totally within the capabilities of SQL. It's pretty usual, in fact, since it's the basic structure of many-to-many joins.

    Are you familiar with writing join statements connecting two...

    - 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: Discarding records whith date gaps

    Does it cascade? If, for example, you had an enroll date that was within 8 weeks of a prior enroll date, which was within 8 weeks of an even...

    - 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: XML with PrimaryKey values to delete rows in database table at a time

    If I understand you correctly, you'll have to shred the XML and then use that to generate a delete statement. That's pretty straightforward.

    Which version of SQL Server are you...

    - 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 - 6,406 through 6,420 (of 14,953 total)