Forum Replies Created

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

  • RE: Query execution time high cost?

    how about something like this:

    selectjobcode,

    complexcode,

    unitcode,

    ga_drg_no,

    isnull(sum(cast(b.item_wt as decimal(18,3))),0) as itmwt,

    sum(cast case when c.location='Shop' then isnull(c.item_wt,0) else 0 end as decimal(18,3)) as fabscope_Shop,

    sum(cast case when c.location='Site' then isnull(c.item_wt,0) else...

  • RE: Create Job to add and remove data automatically.

    I would add 2 date fields, start_dt and end_dt and populate both when the record is added. Then change all sql selecting data to use getdate() between start_dt and...

  • RE: Cursor Output

    Great! I'm glad it worked out, that was my first post;-)

  • RE: Cursor Output

    I haven't seen anyone post code, so here's my first attempt:

    select TOP (100)

    /* your 4 fields */

    grp.localGroupName0,

    sys.Netbios_Name0,

    wittSrv.server_id,

    MemberName = case substring(grp.MemberName0,1,len(sys.netbios_name0))

    when sys.Netbios_Name0 then '*local*' + substring(grp.MemberName0,len(sys.netbios_name0) +...

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