Forum Replies Created

Viewing 15 posts - 16 through 30 (of 34 total)

  • RE: Need help on Dynamic SQL

    Matt Wilhoite (11/9/2009)


    I have a solution that works using a loop and dynamic SQL. But this has some stipulations with it. I changed the table variables to be...

  • RE: Need help on Dynamic SQL

    Matt Wilhoite (11/9/2009)


    This is really quick and probably dirty. I am trying to come up with a better way to determine the joins cause right now you will need...

  • RE: Need help on Count row with rules

    arun.sas (11/6/2009)


    Sharul Nizam (11/6/2009)


    --RID always same, TrnxID always unique, RNam alway same

    --BusN may be same may be not, TTime always unique

    --TripDte always same, TTID sometime no value sometime have value

    --SeatN...

  • RE: Need help on Count row with rules

    arun.sas (11/6/2009)


    Sharul Nizam (11/6/2009)


    is that true?

    Hi,

    NO, group by all columns gives difference count in the above case; post your full table with sample data may give some clarity.

    My table and...

  • RE: Need help on Count row with rules

    arun.sas (11/6/2009)


    Hi,

    Try this

    select t1.TrnxID,strPosi,posi,count(posi)coun

    from

    @tPosiHdr t1 left outer join @tPosiDtl t2

    on t1.TrnxID=t2.TrnxID

    and t1.strPosi <> t2.Posi

    group by t1.TrnxID,strPosi,posi

    My origin table as follow,

    -- TrnxID in @tPosiHdr is unique

    declare @tPosiHdr TABLE (

    TrnxID int...

  • RE: About trigger

    Kindest Jeff Moden,

    Tq for that info. 🙂

  • RE: SQL Query Tuning

    tq to all of you. 🙂

  • RE: Table Design

    Kindest Mr. Anirban Paul and Mr. John Mitchell ,

    Tq to both of you. Really appreciate it.

  • RE: Table Design

    If divide table into more table, is that affect the performance? It is because if we're running the queries, it will cost more join table. More inner join we're using,...

  • RE: count problem - ???

    tq all. i will help me.

  • RE: Count record from different table

    How i can avoid using table variable for boost the performance?

  • RE: Count record from different table

    Hi,

    I did'nt understand the statement,

    INSERT @t

    SELECT 'KL202', 'JPJ' UNION ALL

    SELECT 'KL202', 'JPJ' UNION ALL

    SELECT 'KL202', 'JPN' UNION ALL

    SELECT 'KL202', 'JIM' UNION ALL

    SELECT 'KL202', 'JIM' UNION ALL

    SELECT 'KL101', 'JPJ' UNION ALL

    SELECT...

  • RE: Stored Procedure - Doing Insert and delete as single workable unit

    I did not see the Delete statement to clear REPLAY_LOG_NEW become

    REPLAY_LOG_NEW

    ACTIVITYID | Student

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

    2  | James

    2  | William

    According to your SQL Scripts, REPLAY_LOG_NEW have a same data with REPLAY_LOG.

    where i need to put delete...

  • RE: Display distinct record and return result from another table

    tq sushila. . it's work.

  • RE: Grouping with formula

    tq everyone. especially mr. JeffB. your solution give me an idea to solve it.

Viewing 15 posts - 16 through 30 (of 34 total)