Forum Replies Created

Viewing 15 posts - 3,691 through 3,705 (of 15,381 total)

  • RE: Case statement

    cbrammer1219 (10/6/2014)


    Yes I did, and the example you provided did not help, but thanks for your attempt.

    Cool. Glad that you figured out a solution. You could simplify your query to...

  • RE: Case statement

    cbrammer1219 (10/6/2014)


    I just did this..

    select distinct

    extension

    from tblEmpData

    where LEN(extension) > 3 and extension not like '6%' and DEPARTMENT like 'Service%'

    union all

    select distinct

    case

    when agent_id is not null...

  • RE: Case statement

    cbrammer1219 (10/6/2014)


    Because there is also a extension field, sorry guys copied the wrong query. I am trying to put extension, agent_ID and agent_ID into extension, sometimes one extension will have...

  • RE: Today's Random Word!

    SQLRNNR (10/6/2014)


    geoduck

    Yummy!!!

  • RE: Same Query, Different Server, Different Plan

    jvkondapalli (10/6/2014)


    Hello,

    We have Identical hardware on two servers. Also, Index fragmentation and statistics are same. But, Execution plan is different for the same query.

    Server 1 was generating bad plan....

  • RE: Case statement

    Something like this if I understand what you are after.

    SELECT AGENT_ID

    FROM [AA_Helper].[dbo].[tblEmpData]

    where AGENT_ID is not null

    group by AGENT_ID

    union all

    SELECT agent_id2

    FROM [AA_Helper].[dbo].[tblEmpData]

    where agent_id2 is not null

    group by agent_id2

    Now unless you include...

  • RE: Case statement

    cbrammer1219 (10/6/2014)


    I created one cte, and then union all the select of agent_ID2..Like this

    ;with

    csServiceExtAgentID(Extension) as

    (SELECT DISTINCT

    CASE WHEN [AGENT_ID] is not null then AGENT_ID end as extension

    FROM...

  • RE: Secret Santa SQL

    LittleDuck (10/6/2014)


    Hi all,

    I'm trying to create some SQL to then run a Cognos report. This is what I have so far but I am finding that every few runs...

  • RE: Are the posted questions getting worse?

    Here is a hilarious video. Anybody involved in Scouting should appreciate this. I am sure there are others involved with scouting besides Grant and myself. http://www.youtube.com/watch?feature=player_embedded&v=mgmbwRgfVhc

  • RE: Today's Random Word!

    Ed Wagner (10/2/2014)


    Sean Lange (10/2/2014)


    Ed Wagner (10/2/2014)


    Sean Lange (10/2/2014)


    Ed Wagner (10/2/2014)


    BWFC (10/2/2014)


    Sean Lange (10/2/2014)


    Ed Wagner (10/2/2014)


    whereisSQL? (10/2/2014)


    SQLRNNR (10/2/2014)


    Ed Wagner (10/2/2014)


    djj (10/2/2014)


    Ed Wagner (10/2/2014)


    SQLRNNR (10/2/2014)


    sinew

    Tendon

    Bone

    Bad

    Sheep

    Wool

    Warm

    Fuzzies

    Felts

    Sofa (from 1970 ;-))

    Divan

    Velour (ack)

    Corduroy (more ack)

    Jeans...

  • RE: Today's Random Word!

    Ed Wagner (10/2/2014)


    Sean Lange (10/2/2014)


    Ed Wagner (10/2/2014)


    BWFC (10/2/2014)


    Sean Lange (10/2/2014)


    Ed Wagner (10/2/2014)


    whereisSQL? (10/2/2014)


    SQLRNNR (10/2/2014)


    Ed Wagner (10/2/2014)


    djj (10/2/2014)


    Ed Wagner (10/2/2014)


    SQLRNNR (10/2/2014)


    sinew

    Tendon

    Bone

    Bad

    Sheep

    Wool

    Warm

    Fuzzies

    Felts

    Sofa (from 1970 ;-))

    Divan

    Velour (ack)

    Corduroy (more ack)

  • RE: Today's Random Word!

    Ed Wagner (10/2/2014)


    BWFC (10/2/2014)


    Sean Lange (10/2/2014)


    Ed Wagner (10/2/2014)


    whereisSQL? (10/2/2014)


    SQLRNNR (10/2/2014)


    Ed Wagner (10/2/2014)


    djj (10/2/2014)


    Ed Wagner (10/2/2014)


    SQLRNNR (10/2/2014)


    sinew

    Tendon

    Bone

    Bad

    Sheep

    Wool

    Warm

    Fuzzies

    Felts

    Sofa (from 1970 ;-))

    Divan

  • RE: Conversion of varchar to datetime

    This is one of those rare times when you can get away without defining the scale of a varchar. When you use varchar you should ALWAYS specify the scale.

  • RE: Today's Random Word!

    Ed Wagner (10/2/2014)


    whereisSQL? (10/2/2014)


    SQLRNNR (10/2/2014)


    Ed Wagner (10/2/2014)


    djj (10/2/2014)


    Ed Wagner (10/2/2014)


    SQLRNNR (10/2/2014)


    sinew

    Tendon

    Bone

    Bad

    Sheep

    Wool

    Warm

    Fuzzies

  • RE: Row Size Limitation

    Koen Verbeeck (10/2/2014)


    Sean Lange (9/29/2014)


    Koen Verbeeck (9/29/2014)


    Sean Lange (9/29/2014)


    I know that this is not neccesarily your design but starting all your table names with tbl_ and storing the datatype used...

Viewing 15 posts - 3,691 through 3,705 (of 15,381 total)