Forum Replies Created

Viewing 15 posts - 106 through 120 (of 291 total)

  • RE: Insert Into --new records only

    You had it about right.  Use a "not exists" clause.  Here is an example presupossing two databases (db1 and db2) both with a tabled named t1 which have two columns...

  • RE: Need some advice

    There are a lot of variables that you didn't touch on in making a decision of this nature, but based on what was provided I recommend a single database.  My...

  • RE: UNION won''''t work when there''''s an ORDER BY in a subquery?

    Ryan: I don't have a better solution of the top of my head.  However you would be better off posting this as a new question.  Most people won't read this...

  • RE: CrossTab..

    I don't have any problems with tools, but what I don't need when I have a question is someone telling me to buy a tool.  As I said before, help...

  • RE: how to split the insert to table - depend the number

    My last post had one method of doing it:

    --this insert will create 5 rows for each sn (2345 and 4567)

    insert into new_tb

     select 5,getdate(),user, *

     from tb_parts

     where sn = '2345' or sn...

  • RE: Print Statement Into a Temp Table

    Jeff: No problem, it actually applied to me too, when I saw your post it was a "Duh! why didn't I think of that" moment 

  • RE: sort order

    You could turn your Stored Procedure into a Function and then let the calling routine sort anyway it wants, for example:

    if object_id('ufnEmployees') is not null drop function ufnEmployees

    go

    create function ufnEmployees...

  • RE: CrossTab..

    Jeff: I checked out his login and he seems to only be able to promote one single product.  It doesn't matter what the problem/question is the solution is always his...

  • RE: Print Statement Into a Temp Table

    declare

    @msg varchar(100)

    set

    @msg = LTRIM(STR(

  • RE: CrossTab..

    SQL 2000:

    select ci, business, source, (case analyst when 'Chayan' then times else 'Nil' end) as Chyan,

                                 (case analyst when 'Remya' then times else 'Nil' end) as Remya

    from your table

    --James

  • RE: how to split the insert to table - depend the number

    Well I don't suppose it matters at this point.  Please try the last code batch I posted.  It does not rely on the advanced features of 2005 and should run...

  • RE: how to split the insert to table - depend the number

    Thanks Jeff, this is getting old.  And thanks for the code that generates the 100 sequential numbers.  I got that off a post of yours a few weeks back where...

  • RE: how to split the insert to table - depend the number

    The trigger is for the "TB_New" table.  It will fire when ever an insert occurs to your "new table".  By doing it this way you don't have to worry about...

  • RE: Impossible to catch error for : Cannot insert duplicate key row in object .......

    David: that procedure would break and exit the routine prior to the error trap, however if you do the following:

    begin

    declare @sql_ nvarchar(100)

    declare @error_ int

    set @sql_ = N'Exec TestProcedure 10'

    exec sp_executesql...

Viewing 15 posts - 106 through 120 (of 291 total)