Forum Replies Created

Viewing 15 posts - 2,221 through 2,235 (of 2,462 total)

  • RE: Query difference: HOw to Avoiding UNION ALL with correlated Query

    i didnt get ur question but if u e asking about which query is corect and the query which has UNION ALL

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Query difference: HOw to Avoiding UNION ALL with correlated Query

    Not working 🙁

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Query difference: HOw to Avoiding UNION ALL with correlated Query

    yes . ur query is not returning any row

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Query difference: HOw to Avoiding UNION ALL with correlated Query

    sample data is not possible , as it includes amny tables

    yes row count is correct and time taken = 18 secs

    but my concerns is UNION ALL with...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Query difference: HOw to Avoiding UNION ALL with correlated Query

    thanks for ur reply but its not working

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Obtimizing Query

    Gail,

    i posted as u suggested as u have asked to do in that link

    i have pasted tables definition along with index defintion

    but for more detail :...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: How to avoid LEFT JOIN ??

    thanks a lot

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: How to avoid LEFT JOIN ??

    the inner derived table ( pasted below ) gives an error

    -Query : ------------------------

    select

    rad.inner_qstn_text,case when rad.inner_qstn_choice = c.left_label then Avg(cast(c.seqn as float)) else null end...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: How to avoid LEFT JOIN ??

    yes both left join will give me two different results

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: How to avoid LEFT JOIN ??

    he explained the same reason i mentioed above that

    we are using same tables twice and only differnce is on clause in #tmpcol

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Creating dynamic sql stored procedure

    Chander ,

    frankly i have got you requirement clearly but if you want to know about dynamic sql building and iteration with WHILE loop here is the simple example .

    declare @counter...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: How to avoid LEFT JOIN ??

    my senior DBA suggest that

    we should avoid this left join

    table schema

    ------------------------------------------------

    declare @tempRetutnTable table

    (

    inner_qstn_text nvarchar(max),

    leftlabel_avg float,

    rightlabel_avg float,

    left_label nvarchar(200),

    right_label nvarchar(200)

    )

    CREATE TABLE #coltmp

    (

    seqn int identity(1,1),

    col_choice nvarchar(4000),

    left_label nvarchar(200),

    right_label...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: "NULL" behaves wierd ...WHY ??????

    but why count(*) wll be treated differently from count(id1) though both contains same records?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Why not Index Seek ?????????

    yes vyas , i dropped the index from acct_id and cont_stub

    and now query used "clustered index scan"

    but i couldnt understand why it went for clustered index scan.?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Why not Index Seek ?????????

    my question is how it can go for

    seek without cont_stub and evt_stub ?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

Viewing 15 posts - 2,221 through 2,235 (of 2,462 total)