Forum Replies Created

Viewing 15 posts - 826 through 840 (of 1,271 total)

  • RE: Convert numeric to date

    That's what I would do. I would store the value as a datetime or smalldatetime and then use a persisted computed column for the integer value. Like so:


    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: Table Defaults

    In this respect, Joe and I are in absolute agreement.


    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: How do I call a stored procedure from a linked server?

    And how would you start the job from TSQL on the remote server?

    By executing sp_startjob using the 4 part name.


    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: maybe dumb, but it doesn''''t work like I thought...

    You are correct, Phil. That would be less confusing.


    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: Weird user authentication problem

    The key is that it thinks the user account is Null. Tell the user to reboot their machine. In most cases I have encountered this resolves the issue. If not,...


    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: maybe dumb, but it doesn''''t work like I thought...

    Sergiy is almost correct. Null does not equal 0 and Null does not not equal 0. That's why we use "Is Null" and "Is Not Null" instead of "= Null"...


    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: Complex Expression (CTE) equivalence in SQLServer 2000

    CTE = Common Table Expression.

    There is no equivalent functionality in SQL 2000. If you post the actual view statements, maybe we can help.


    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: USE DB with a variable

    Be aware that the Use statement will only apply to the dynamic query being run.


    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: XML parsing error: Invalid at the top level of the document.

    Look up "XML bulk load [SQL Server]" in Books online. Bulk load the XML document into a table and then use sp_XML_preparedocument.


    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: Convert numeric to date

    Don't use "getdate() - 30". Use the DateAdd() function.


    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: How do I call a stored procedure from a linked server?

    Post your code where you call the procedure. You're not calling it right.

     


    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: Security best practice for linked servers

    No. You know how to set up a view locally where the user has permission to the view but not the table(s) right? Do that and then on the remote...


    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: How do I call a stored procedure from a linked server?

    Use the 4 part name:  [Server].[Database].[Owner].[Procedure]

    Exec MSDB4.MyDatabase.dbo.MyProcedure


    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: Table Defaults

    You seem to be taking this very personal. I'm not sure what that's about, but I'm sure it's nothing that a few hours on a couch can't resolve.

    Yes, we use...


    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: Table Defaults

    I've never tried that approach though i have done the opposite (with procedures, not triggers) that would only run if the calling user was logged in with my SQL account...


    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 - 826 through 840 (of 1,271 total)