Results 1 to 2 of 2

Thread: Sql script

  1. #1
    Join Date
    Jul 2008
    Posts
    10

    Red face Unanswered: Sql script

    HI Everyone,

    can someone help me with the following script please, The ErrorMessage coulumn is truncated to the first . (dot) it see, but I what it to carry onto the next . (dot) it see's

    Example:
    Cannot execute stored procedure dbo. - not right
    Cannot execute stored procedure dbo.STOREPROCEDURE. -- This right

    Can someone please please help

    Thanks in advance

    If exists (select * from tempdb..sysobjects where name like '#LOGIDS%')
    Begin
    drop table #LOGIDS
    End


    GO

    select i.transactionID, logID into #LOGIDS

    from [IPCSSQLPROD\PROD].iProfiler_Queues.dbo.v_ProcessorQueue i with (nolock)

    inner join

    ( select transactionID, max(LogEntityID) [logid]

    from iProfiler_ProcessLogs..v_log l1 with (nolock)

    inner join iProfiler_ProcessLogs..v_logentity e1 with (nolock) on l1.logid = e1.logid

    where logentitytypeid = 11

    and l1.createddate between '2010-11-16 00:00:00' and '2010-11-23 23:59:59'

    group by transactionID) raa on raa.transactionID = i.transactionID

    where i.statusID = 11

    --and i.companyid != 101841


    select substring(value01,1,case when charindex('.', value01) > 0 then charindex('.',value01) else 1 end) ErrorMessage , count(LogEntityID) NumTransactions

    from iProfiler_ProcessLogs..v_logentity e1 with (nolock)

    inner join #LOGIDS on #LOGIDS.logID = e1.LogEntityID

    group by substring(value01,1, case when charindex('.', value01) > 0 then charindex('.',value01) else 1 end)

    order by 2 desc

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Please supply a few examples of original error messages, and the strings you would like to produce from them.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •