Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)

  • RE: Need to obtain SQL Statement for SPID

    Or you can try something like the statement below:

      SELECT

       ss.is_user_process ,

       ss.session_id,

       ss.host_name, 

       ss.login_name,

       ss.nt_domain,

       ss.nt_user_name,

       ss.status,

       ss.total_elapsed_time,

       ss.reads,

       ss.writes,

       ss.logical_reads,

       ss.cpu_time as SessionCPU, -- CPU time, in milliseconds, that was used by this session.

       ss.row_count,

       ss.prev_error,

       (select m.text from sys.messages m...

  • RE: sp_helpindex doesn''''t tell about covering index !

    Got it , thank you.

     

    R

  • RE: Multiple aggregates using PIVOT

    A combination between the 2 solution can do as well :>)

    SELECT *

    FROM

    (

    SELECT [PRODUCT_NAME],[PART_NUMBER],[Qty],

    sum(case when Product_Name = 'BOM1' then isnull(Extended_Cost,0) else 0 end ) as Bom1Cost,

    sum(case...

  • RE: Return OS Userid in trigger

    .. try something like this in your trigger:

    select  SYSTEM_USER,HOST_NAME(),user_name(),SESSION_USER,

  • RE: Generating a doctype declaration with for xml explicit

    ..maybe something like this :

    create procedure test as

    begin

    select top 10 *

    from mytable

    for xml explicit

    end

     

    Cheers

    R

Viewing 5 posts - 1 through 5 (of 5 total)