Forum Replies Created

Viewing 15 posts - 4,006 through 4,020 (of 7,636 total)

  • RE: Cursors Be Gone!

    darren.flynn (1/6/2009)


    There seems to be a lot of confusion between table variables and temporary tables.

    For us table variables have proved to be of massive benefit, outperforming cursors in every instance...

  • RE: UPDATE from CTE

    Yeah, AFAIK, Derived Tables and CTEs work just like Views in that respect: as long as they follow the rules for writable Views, you can write through them.

  • RE: How can I loop sp_help through for all tables or objects?

    The undocumented procedures also use cursors.

    Also, please note that the request was to document a dsingle database, not every database on the server at once.

  • RE: How can I loop sp_help through for all tables or objects?

    Yeah, but that uses a cursor. Better to avoid them.

  • RE: Creating an efficient relationship?

    Chirag (1/5/2009)


    Hi

    Nice design RbarryYoung. A slight variation from your design.

    AssnType in DemoAddr_Assn can also keep that a particular address is the good one. So we can avoid AddID column...

  • RE: getting all records between 2 fridays of a given date

    Jeff Moden (1/1/2009)


    Day "0" is 01/01/1900... and it was a Monday... Guess what happens if you add 4 days to any Monday? You get a Friday... every time.

    Sorry Jeff,...

  • RE: Creating an efficient relationship?

    4) SOP design for this problem with one AddrID in the demographic record indicating the one good one and then allow the many to many relationship to allow multiple addresses...

  • RE: Spatial Problem -- Polygons

    Ring orientation in polystring/polygon spherical mapping is usually used to indicate which side of the polygon string is the area "contained" by the polygon.

    For instance, consider a polygon string that...

  • RE: Fast way to compare the fields between two databases

    Try this:

    Select * From TargetDB.INFORMATION_SCHEMA.COLUMNS

    EXCEPT

    Select * From ReferenceDB.INFORMATION_SCHEMA.COLUMNS

  • RE: How can I loop sp_help through for all tables or objects?

    This should do it:

    Declare @sql Nvarchar(MAX)

    Set @sql = N''

    Select @sql = @sql + N'

    EXEC sp_help ''['+TABLE_SCHEMA+N'].['+TABLE_NAME+N']'';'

    From INFORMATION_SCHEMA.TABLES

    Print N'Executing:

    '+@sql+'

    '

    EXEC(@sql)

  • RE: UPDATE from CTE

    Chris Morris (1/5/2009)


    Philip Horan (1/5/2009)


    Chris I was just playing with the CTE concept as I am quite new to TSQL.

    Moving forward part of the learning process is to know when...

  • RE: CXPACKET wait

    I agree with Gail. My gut feeling for a DW with 4x2 cores is that MAXDOP should be between 2 and 4 (i.e., 2, 3, or 4).

  • RE: Cursors Be Gone!

    OK, on my box, I am getting the following results:

    Original cursor: 410ms

    RowNum (mine): 45ms

    Identity (Matt's): 123ms

  • RE: SELECTing from Excel using OPENROWSET

    rehman (1/5/2009)


    RBarryYoung (1/5/2009)


    And does it still work if you remote into the prod server and run SSMS there?

    Yes, it works that way on both prod and dev servers.

    And I just...

  • RE: Cursors Be Gone!

    Farrell Keough (1/5/2009)


    We have one last cursor used for an unusual "counting" routine we must follow. I attempted to replace it with this method, but it is slower than...

Viewing 15 posts - 4,006 through 4,020 (of 7,636 total)