Forum Replies Created

Viewing 15 posts - 1,861 through 1,875 (of 2,171 total)

  • RE: Passing the cycle parameter into xp_readerrorlog

    Also, do you have appropriate rights on the remote server to read the log files?

  • RE: Passing the cycle parameter into xp_readerrorlog

    That is becuase errorlog.2 probably does not exist on the remote server!

    What does EXEC servername.master..xp_enumerrorlogs tell you?

    This is probably what you want.

    DECLARE @SQL VARCHAR(8000),

     @ServerName VARCHAR(100)

    SELECT @ServerName = 'anysqlservermachine'

  • RE: Need Help with Query

    Gila, you are almost there! Just make sure you don't match 4 and 14 and so on with LIKE %.

    declare @item table (i_id int identity(1,1), itemname varchar (100),...

  • RE: crosstab

    select  'c1' [column],

      max(case when yr = 1995 then c1 end) [1995],

      max(case when yr = 1996 then c1 end) [1996],

      max(case when yr = 1997 then c1 end) [1997],

     ...

  • RE: multiple logins

    Make use of the SYSPROCESSES table.

     

    select * from master..sysprocesses

  • RE: Port 1433 blocked

    You also have to tell SQL Server which port to listen on. The same port you use for SQL server, must be opened in the firewall Norton provide.

  • RE: crosstab

    -- prepare test data

    declare @test table (Yr int, C1 int, C2 int, C3 int, C4 int, C5 int, C6 int)

    insert @test

    select 2000, 2, 4, 5, 6, 7, 8 union...

  • RE: Id of the last inserted

    Sergiy,

    Scope_Identity() is an useful function even if not in "developer sand box mode".

    If you are having a trigger on the customer table that inserts a row in an audit table,...

  • RE: help with creating table defining co relation

    Create a table with three columns. First column is the "from group", second column is "to group" and the third column is the co-relation between the two...

  • RE: complicated loop query

    Yikes!

    -- prepare test data

    declare @sample table (id int identity (1, 1), transaction_type int, profit_loss int)

    insert @sample

    select 10, 200 union all

    select 11, -20 union all

    select 12, 100 union all

    select 12, -120 union...

  • RE: empty string

    It is the correct syntax. I think it is something else that is wrong.

    In what context are you using LEN(VarCarCol) > 1?

  • RE: count in table

    You should make use of the RAISERROR method. Read about it in Books Online.

  • RE: How To use while loop without using a cursor

    Joe, this problem does not need a cursor. Never use a cursor when a set-based solution is available.

    Look at this simple solution.

    -- Update the existing accounts in...

  • RE: Help with leading 0s

    DECLARE @Zeros TINYINT

    SELECT @Zeros = 10

    SELECT MyColumn,

           RIGHT(REPLICATE('0', @Zeros) + CONVERT(VARCHAR, CAST(100 * ROUND(MyColumn, 2) AS INT)), @Zeros)

    FROM   MyTable

     

  • RE: Finding server name on remote server

    You have to write a SP on the remote server that does this

    select host_name()

     

    Then you have to execute that SP from the linking server.

Viewing 15 posts - 1,861 through 1,875 (of 2,171 total)