Forum Replies Created

Viewing 15 posts - 31 through 45 (of 53 total)

  • RE: Query Help

    Lynn Pettis (6/13/2012)


    Nagaram (6/13/2012)


    I am not sure on which rank function needs to be apply and where to apply to get above RANK .

    In my sample data TECH_MODE field...

  • RE: Query Help

    thanks for suggesting rank function ..

    I know about this..

    But my problem is

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

    Looking at the following two records:

    2 1 5 2012-05-03 20:29:53.000 2012-05-03 20:29:55.000 2

    3 1 5 2012-05-03 20:29:56.000 2012-05-03 20:30:03.000...

  • RE: Query Help

    your correct . !

    :50 is just typo ..

    Always begin_time in incremental value.

    I am not sure on which rank function needs to be apply and where to apply ...

  • RE: Query Help

    Actually I need to apply one of the rank function .

    Expected output 1:

    IDREFERENCE_IDTECH_MODE_IDBEGIN_TIMEEND_TIME RANK

    1162012-05-03 20:29:22.0002012-05-03 20:29:52.000...

  • RE: Query for Dependencies

    Thanks

    Cadavre and Lynn Pettis for your valuable replays

  • RE: Query for Dependencies

    i mean

    TABLE1 and TABLE2 have no dependencies .

    consider VIEW5 .. VIEW5 it depends on VIEW4 , VIEW4 depends on VIEW3 again VIEW3 depends on VIEW2 and VIEW2...

  • RE: Query for Dependencies

    It is not about ORDER BY clause....

    As per sample data to execute VIEW1 before we should create TABLE1 and TABLE2 So in this case the order of execution...

  • RE: Date Query help

    Thanks you So much Mark,

    It really Excelent

  • RE: Next half an hour time

    I Blindly inserted data for sample

    my intension was to display next half an hour

  • RE: Next half an hour time

    Sorry ,

    I got it by using following query.

    select

    dateadd(minute,30,dateadd(minute,(datediff(minute,0,startdate)/30)*30,0))startdate

    ,dateadd(minute,30,dateadd(minute,(datediff(minute,0,enddate)/30)*30,0))enddate

    from #temp

  • RE: Tacking History

    Thank you Sean Lange,

    Now I am adding HISTORY_TRANSACTION_DATE column to

    ATP_TRANSACTION_HISTORY table

  • RE: Tacking History

    Hi sachnam,

    DML Triggers not needed for my scenarios.

    records will store in HISTORY table by front end application.

    My requirement is :

    at first ATP_FA_FLIGHTS table having following data

    FLIGHT_IDFLIGHT_NAMEFLIGHT_EXTRANAME

    151old flightold extra name

    in...

  • RE: Tacking History

    Hi Sean Lange,

    for getting the most recent values for each column

    i may use row_number() with partition by table name,column name

    Please help me how can join rows of a history Table...

  • RE: Query help

    I did it using cte

    with cte as

    (

    select roomid,lookupdesc,fromdate from room

    union all

    select c.roomid,c.lookupdesc,c.fromdate+1 from cte c join room r on r.roomid=c.roomid where r.todate>c.fromdate

    )

    select

    c.roomid

    ,c.lookupdesc

    ,c.fromdate as [date]

    ,subcustId

    from cte c

    left join subcustlink...

  • RE: JOIN HELP

    Thank you

Viewing 15 posts - 31 through 45 (of 53 total)