Forum Replies Created

Viewing 15 posts - 316 through 330 (of 498 total)

  • RE: xp_cmdshell to launch MS Access database

    I've never tried that but I think it's a bad idea in general. If what you really need is access to the tables then look into using OPENDATASOURCE and OPENROWSET....




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Lock Problem in SP

    Are you by chance getting an error on the update that is not getting rolled back and thus locking the table?

     
    

    begin
    set @rep_id = 'PIE'+convert(varchar(3)...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: copy database

    I would simply backup the subscriber aa and copy the backup file to the new machine and restore it. This will lose your subscription information so there will be no...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Drop temp tables

    While SQL Server will drop them for you, I always clean up after myself when I can. It's just a good habit to do so. Also prevents errors if you...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Development Tools

    I've been doing SQL work for about 8 years as well as VB and ASP. A long time ago I started using Visual Studio for all my development work in...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: CURSOR With Dynamic SQL

    This is not allowed in SQL Server. I would use your dynamic sql to fill a temp table and then run the cursor on the temp table. Better yet is...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: copy database

    The simplest way is to use a backup. Then restore the database on the new machine with the MOVE option.

    However I'm not sure what you mean by the different server...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Drop temp tables

    Your if exists could look like the following...

    
    
    IF EXISTS(SELECT * FROM tempdb..sysobjects WHERE id = object_id('tempdb..#temptable'))
    DROP TABLE #temptable


    or a simpler version...
    IF object_id('tempdb..#temptable')...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Conditional @Parameter used in WHERE clause of SP

    I really like Crispin's way of doing it. The nice thing about his version is that depending on how often the parameter is null you can switch it around for...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: touble with union

    You are missing your GROUP BY statement in the first query for the union. However I don't think that really gives you what you want. Try this...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Changing from text to ntext

    As Patrick stated and I tried to point out. If they are not using UNICODE characters then there is no benefit of going to an NTEXT data type. I don't...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Changing from text to ntext

    Going from text to ntext may not solve his problem. I'm pretty sure his problem is due to a problem in ADO and not SQL7. I tried to find the...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Creating a loop for updating

    Sandy,

    I think you will have better luck with the following. Looking at your sql you had a couple errors that would prevent you from being able to run the...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Running A Remote Stored Procedure Asynchronously

    What I typically do in this case is to have a job that queries a table on the remote server. If there is a record in the table that needs...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Linked server and Windows Authentication

    The problem is that SQL Server doesn't forward the login information through remote servers well. What I have always done is to set up a sql user on my linked...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

Viewing 15 posts - 316 through 330 (of 498 total)