Oracle 8i query
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Oracle 8i query

  1. #1
    Join Date
    Feb 2005
    Posts
    31

    Oracle 8i query

    hi...
    i have the folowing Query, and i can't view the latest data after 13-12-05 knowing that if i query the database for data after 13-12 i can easly check for them.it seems the pbm is on the rownum, it was working very well, and no changes happened on the oracle database at that time[working on unix, Oracle 8.1.7.0.0].


    select * from (select rownum rn, s.pan, TO_CHAR(s.trandate, 'dd-mm-yyyy') trandate, s.trantime trantime, s.amount, s.acq_currency_code, s.msgtype, NVL(r.respcode,s.respcode) rsrespcode, NVL(p.pcode, s.pcode) rspcode , s.termid, s.trace from slog s, urtrespcode r , urtpcode p where r.respcodeid (+)=s.respcode and p.pcodeid (+)= s.pcode) where rn>(select count(*) - 1000 from slog) order by rn desc

    thanks in advance
    Oracle,Unix Administrator

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Try this :

    Code:
    select * from 
       (select rownum rn, s.pan, TO_CHAR(s.trandate, 'dd-mm-yyyy') 
                 trandate, s.trantime trantime, s.amount, 
                 s.acq_currency_code, s.msgtype, 
                 NVL(r.respcode,s.respcode) rsrespcode, 
                 NVL(p.pcode, s.pcode) rspcode , 
                 s.termid, s.trace 
         from slog s, urtrespcode r , 
                urtpcode p 
         where r.respcodeid (+)=s.respcode 
            and p.pcodeid (+)= s.pcode
            order by rn desc ) 
    where rn>(select count(*) - 1000 from slog)
    Tamil

  3. #3
    Join Date
    Feb 2005
    Posts
    31

    query

    hi again, and thnaks for your reply.
    unfortunatelly the response is the same with old data from 13-12-05.
    it is some how weird, what you think?
    Oracle,Unix Administrator

  4. #4
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Do you get any result set for this query:
    Code:
    (select rownum rn, s.pan, TO_CHAR(s.trandate, 'dd-mm-yyyy') 
                 trandate, s.trantime trantime, s.amount, 
                 s.acq_currency_code, s.msgtype, 
                 NVL(r.respcode,s.respcode) rsrespcode, 
                 NVL(p.pcode, s.pcode) rspcode , 
                 s.termid, s.trace 
         from slog s, urtrespcode r , 
                urtpcode p 
         where r.respcodeid (+)=s.respcode 
            and p.pcodeid (+)= s.pcode
            order by rn desc )
    Tamil

  5. #5
    Join Date
    Feb 2005
    Posts
    31

    qurey

    hi again...
    yes i get data but dated from 13-12-05 and not from our sysdate.

    something weird in the new data inserted after 13-12?is it logic? it fetch logic data on another instance
    thanks for ur cooperation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width