Forum Replies Created

Viewing 15 posts - 766 through 780 (of 1,271 total)

  • RE: Query...combine results of one column

    Sometimes (not necessarily this time) it is easier or more efficient to take the result set of your current query, and then perform additional processing on it. 2 ways to...


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: dbo ownership

    Objects like views, functions, and procedures that include the Create as part of the object will be scripted out by EM exactly as originally written.

    So if the user creates a...


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: Time Difference

    That query only appears to represent secodns because you put a 1 second delay in there. Comment out the delay and you will see that the timestamp increments each time...


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: Insert failure due to over row size max - but it ain''''t.

    Post the schema of the table (script the create table statement).

     


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: Time Difference

    If you use a column with date values in it, you can do the query you are trying to do:

    Declare

    @test-2 Table


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: More Replication alerts questions

    Don't count on the alerts for anything critical. Instead, create a job that checks the status of replication and handles failures accordingly. For my merge replication, I have a job...


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: DTS help

    It can also be done with just T-SQL.

     

    Declare

    @cmdshell nvarchar(500), @Path nvarchar(200)


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: SQL Server 2000 SP 4 issue with query

    You need to rewrite the query to be efficient. You can do that whole thing without a cursor:

     

    Declare

    @MatterID bigint

    Declare

    @EntityID int

    Declare


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: bulk insert !!!

    Definitely #1.


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: view combines tables from multiple dbs

    Can you modify the tables? If you add a column to the tables indicating the database it is in (or better yet an integer value that references a table with...


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: Generate Script without using EM

    Just be aware that neither scptxfr.exe nor SQLDMO are aware of the new datatypes and such in SQL 2005. SQLDMO will work with SQL 2005 (for backwards compatibilty) but it...


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: Generate Script without using EM

    If you do that, just be aware that if someone uses sp_rename to rename a stored procedure, the text of the procedure doesn't get changed. Therefore, it is possible that...


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: Generate Script without using EM

    You have to use SQLDMO (this is what EM uses). There is no T-SQL way to do this without writing the entire process yourself.

    Look up "Script Method" in Books Online...


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: Ten = Fifteen?

    Actually, it's not the fault of Excel's driver. It's the fault of the ISAM that Excel uses. This problem preceeds Excel.


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • RE: Ten = Fifteen?

    I found this post to be very humerous in the forum talking about the fix:

    This tool can be run while the database is up and can analyze the entire database....


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

Viewing 15 posts - 766 through 780 (of 1,271 total)