Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9039335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:42:20+00:00 2026-06-16T09:42:20+00:00

I’m sure this has been answered before, but the thing is I don’t know

  • 0

I’m sure this has been answered before, but the thing is I don’t know how to look for the solution.

I have a Oracle query that gives me this results:

ETA     Vessel   Line   POD   SZTP QTY
====    ======   ====   ===   ==== ===
26/12   MAEWIS   MAE    LIV   40RH  23
26/12   MAEWIS   MAE    PBL   40RH  12
26/12   APLMEN   APL    PTR   20DR  44
26/12   APLMEN   APL    TRU   20DR  22
27/12   APLMEN   APL    ECS   40RH   7
27/12   RICKEM   HPL    RTT   40RH  18

And what I need is this:

ETA     Vessel   Line   POD   SZTP QTY
====    ======   ====   ===   ==== ===
26/12   MAEWIS   MAE    LIV   40RH  23
                        PBL   40RH  12
        APLMEN   APL    PTR   20DR  44
                        TRU   20DR  22
27/12   APLMEN   APL    ECS   40RH   7
        RICKEM   HPL    RTT   40RH  18

Maybe also doing it for POD and SZTP, if there are many of those within ETA/VSL/LINE

Is there any way of doing this?

This is my query:

select to_char(vv.eta, 'DY-DD/MM') eta,
  a.linevv_vv_vsl_id||'/'||vv.out_voy_nbr vessel,
  a.linevv_line_id line,
  a.discharge_port_id1 pod,
    b.sztp_id sztp,
    b.qty qty
from
  service_orders a,
  service_order_items b,
  vessel_visits vv 
where
   b.so_gkey = a.gkey and
   vv.vsl_id = a.linevv_vv_vsl_id and
   vv.out_voy_nbr = a.linevv_vv_out_voy_nbr and
   sub_type = 'VEPO' and
   ((vv.eta between sysdate and sysdate + 7) or (to_char(vv.ata, 'YYYY-MM-DD') =   to_char(sysdate, 'YYYY-MM-DD')))
order by to_char(vv.eta, 'YYYY-MM-DD')

I’m using Pentaho ETL Tool Kettle to run the query, and transform the data stream into an XML. So, if the solution is on the ETL, I could use some help on how to do it there too.

Many thanks for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T09:42:22+00:00Added an answer on June 16, 2026 at 9:42 am

    I much prefer having all rows defined correctly with all the keys. However, you can do this, you just need to identify the first rows of each grouping.

    with t as (<your query here with `to_char(eta, 'YYYY-MM-DD') as eta_yyyymmdd` added>)
    select (case when seqnum_eta = 1 then eta else '' end) as eta,
           (case when seqnum_vessel = 1 then vessel else '' end) as vessel,
           (case when seqnum_line = 1 then line else '' end) as line,
           pod, sztyp, qty
    from (select t.*, 
                 row_number() over (partition by eta order by vessel, line, pod, sztp, qty) as seqnum_eta,
                 row_number() over (partition by eta, vessel order by line, pod, sztp, qty) as seqnum_vessel,
                 row_number() over (partition by eta, vessel, line order by pod, sztp, qty) as seqnum_line
          from t
         ) t
    order by eta_yyyymmdd, t.vessel, t.line, t.pod, t.sztp, t.qty
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want to count how many characters a certain string has in PHP, but
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have an array which has BIG numbers and small numbers in it. I
I know there's a lot of other questions out there that deal with this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.