Forum Replies Created

Viewing 15 posts - 481 through 495 (of 497 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...

  • 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...

  • 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

  • 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

  • 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

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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


    December 12, 2002 at 6:06 pm

    #444311

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