Forum Replies Created

Viewing 15 posts - 481 through 495 (of 498 total)

  • RE: Replication Vs Triggers

    I would go with Replication. Having written a home brew replication engine I can tell you that you don't want to do it! Your needs are exactly what replication 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: SQL Basics

    Evan,

    I would suggest you read up on Aliasing in SQL Books Online. Basically what we have done in my query was to alias the table name so that we didn'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: Mini profiler

    You might want to put a wrapper on SQL's stored procedures that Profiler uses. You can find them in BOL for System Procedures...

    sp_trace_create

    sp_trace_setfilter

    sp_trace_generateevent

    sp_trace_setstatus

    sp_trace_setevent

    Gary Johnson

    DBA

    Sr. DB Engineer




    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: SQL Basics

    DOH!

    Try changing the T to U... Helps if I don't try to do three things at once!

    Gary Johnson

    DBA

    Sr. DB Engineer




    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: SQL Basics

    Try

    SELECT T.UserID, T.Name, UserCount = COUNT(T.UserID)

    FROM TUserLogs U

    JOIN TSubscribers S ON U.UserID = S.UserID

    GROUP BY T.UserID, T.Name

    ORDER BY COUNT(T.UserID) DESC

    Gary Johnson

    DBA

    Sr. DB Engineer




    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: Urgent pl. - Replication - Errors

    I agree, it looks like a permissions issue. If you look at

    The job failed. Unable to determine if the owner (GLOBAL\TPNSQLServer) of job Expired subscription clean up has 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: Server Listing

    I found this in help...

    The ListAvailableSQLServers method is supported only for servers and workstations running Microsoft Windows NT® 4.0 and Microsoft Windows 2000.

    However even running it on 2000 with SQL...




    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: Can I avoid a cursor

    While I have done the while loop on the identity column as I stated before, I never use Select Into. I always manually create the table or declare the table...




    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: How can i reset RESET IDENTIY SEED for this case ?

    As Don stated this is not a good use of an identity column.

    The way I have done this in the past is to create a temp table and put...




    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: Advanced Stored Procedure Help

    If your query is only going to return 1 record then you can simply select the field value into a variable as follows:

    DECLARE @bFoo bit

    SELECT @bFoo = Foo

    FROM TBL

    WHERE ID...




    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: Row Numbers for a Select

    The best thing about using the function is that you can simply replace the original table with the function in your select statement. Also you could add parameters for 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: A better way of generating numbers than identity

    I've done something very similar to what Jeff just posted. Only main difference was we wrapped it in a transaction.

    BTW: Be VERY careful of using identity columns if you ever...




    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: Trouble with Transactions

    If you are using the debugger and have the check box to rollbak at the end checked then the following will not create a new transaction as @@TRANCOUNT will be...




    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: Can I avoid a cursor

    At times cursors are the best way to do things. You might also think about using a table variable that has an identity column and then doing a while loop...




    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: Basic debugger question...

    quote:


    Thanks.

    Steve, details about the 'issues' would interest me. Sorry if you mentionned them elsewhere and I didn't see them.

    Elno





    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 - 481 through 495 (of 498 total)