Combining multiple rows into a single row

Hi all,
I have a tricky situation in a HR select.
Imagine I have a dataset as below, simplified of course.
Name Start Date End date Job Title Salary
Tom 01/01/07 02/03/08 Gopher £500
Tom 03/03/08 jobsworth £600
Rick 04/05/09 Painter £500
Harry 02/06/07 02/06/08 Gardener £300
Harry 03/06/08 03/06/09 Runner £200
Harry 04/06/09 Cook £400
now, I need to select from above and return 3 rows so it looks as below
name start date enddate title salary start date enddate title salary start date enddate title salary etc etc
tom 01/01/07 02/03/08 gopher £500 03/03/08 blah 600
Rick 04/05/09 painter £500
harry etc etc etc
Now, I know how to select onto one row ok, asumming that each employee has a fixed number of roles but the problem is that each employee has a different number of jobs, one could have had 5 while another 50 and I do not know the maximum at this time.
Anyone have any ideas on how to appraoch this?
tia,
dw
Edited by: derrywriter on Oct 2, 2009 3:50 PM
Edited by: derrywriter on Oct 2, 2009 3:54 PM

Ideally this should be done in a suitable reporting tool.
Standard SQL requires a deterministic number of columns to be known at parse time i.e. before the data is fetched it needs to know how many columns are being returned.
If you know there is a fixed maximum to the number of columns that can be returned you can use one of the various pivot methods (search the forum) which differ depending on whether you're using 9i, 10g or 11g database.
If you can't determine a maximum number of columns you're pretty much stuck, unless you want to write some clever interfacing to the oracle ODCI as demonstrated in this thread:
How to pipeline a function with a dynamic number of columns?
Personally, I believe such reporting styles should be reserved for reporting tools.

Similar Messages

  • Hiding filenames when combining multiple files into a single .pdf

    I'm fairly new to this Acrobat X. I'm trying to assemble my portfolio to distribute to employers but I cannot seem to get rid/hide the filenames in the final pdf file. I was using the option to 'combine multiple files into a single pdf' because I was compiling images and documents to a single readable pdf file. I got all that done but once I open it, I'd see that each page would still contain the original file names rather than page numbers - which I prefer not to have employers see for the sake of tidiness (and I refuse to use the Adobe portfolio because it's not really efficient on space or design. I prefer a simple page-by-page pdf). So I was wondering if anyone can tell me how to hide my file names, change them into page numbers or getting rid of them all together so the 'Table of Contents' in the pdf preview mode would not show anything, I would really much appreciate it.
    -Ss

    Well, when the .pdf is in the final, deliverable form; I open it in Mac preview mode and the sidebar is always extended showing a 'table of contents' rather than having each document in the pdf file have a number designating a page name, it shows each individual filename the pdf is composed of. Not too sure about bookmark, though. Thanks for the reply!
    If you want, I can send the file to you.

  • Combining multiple lists into a single list

    Hi, 
    I have created 5 different lists within the same sharepoint site. These lists have some common fields among them for example each list has same fields such as "Country", "Unit", "Review Name" etc. I now want to create a single
    list that will have show only the common fields present in each list. Could you please advise if this can be done and if so how?
    Thanks, Aarti

    To have a full fledged synchronization between 5 lists will be very complicated.
    If the 6th list is a read-only / view only, I would recommend you to create Lists 1, 2,3,4 and 5 as a custom content type.
    Then you can put a Content Query Web Part that filters out your custom content type and combines the content from the three lists.
    or create a  workflow to update the data when new item is added in other lists
    Check the similar post
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/2480cdbe-acb4-434f-9866-cf716cad0994/combining-multiple-lists-into-a-single-list?forum=sharepointadminlegacy
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/5a853466-7480-438a-b32d-3ad6d34347ef/combine-lists?forum=sharepointdevelopment

  • Append or combine multiple IDOCs into a single IDOC file

    Hi All,
    We are implementing multiple new payment types that will generate IDOC files for us to send to the bank.  To keep the cost to the minimum, the requirement is to combine multiple IDOCs to a single file.
    I'd like to know the most efficient way to complete this task.  Also, I am new to this forum, please let me know if I need to include additional information.
    Your help will be deeply appreciated.
    Thank you,
    Joanne T.

    Hi Milind,
    One way you can do this is generate each report in PDF or Postscript, and then use Adobe Acrobat Distiller to combine the files into one PDF document.
    Regards,
    Stewart

  • Is there a way to combine multiple pages into a single document?

    In the program "Pages," is there a way to combine multiple pages in a single document?

    Jean Louis Gassee, who used to be a senior Apple executive, wrote on Apple's bad approach to the latest iWork suite:
    https://discussions.apple.com/message/25209121#25209121
    Peter

  • Combining multiple files into a single PDF/A

    The issue brought up in another discussion is the loss of PDF/A conformity when “merging” multiple PDF/A files into a single file (I use PDF/A for preservation of corporate records). The “insert” option retains conformity but does not allow inserting multiple files in a certain order, unless you insert them one by one (which is a pain when you have 50 files to attach).
    The solutions I’ve come up with so far:
    1)     1)  In AAPro – combine files into a single PDF and then convert it to PDF/A using Preflight. This is easy, my only problem is that I don’t have AAPro (and AAStandard doesn’t convert to PDF/A).
    2)     2)  In AAStandard – combine files into a single PDF and then “print” to PDF/A. The problem of this “re-frying” is that it only creates PDF/A-1b (not 1a), bookmarks and OCR of scanned pages are lost, and files become significantly larger.
    I wonder if anyone knows a more intelligent way around this problem, provided that I only have AAStandard. Thanks!

    Well, when the .pdf is in the final, deliverable form; I open it in Mac preview mode and the sidebar is always extended showing a 'table of contents' rather than having each document in the pdf file have a number designating a page name, it shows each individual filename the pdf is composed of. Not too sure about bookmark, though. Thanks for the reply!
    If you want, I can send the file to you.

  • Combining multiple records into a single record (View)

    Okay so here is my scenerio:
    There is a table I have made that details SQL jobs and the various details about them. What i wan't to do is make a view with specific logic implemented. Fields that will be taken across to this view will be: LastRunDate, LastRunTime and Step_Status.
    JobName will also be used to define the logic but will not be a column in itself.
    What i wan't is an additional column using this logic, called 'DataSet'. For each Dataset there are multiple jobs that are unique to it, so there are multiple records being brought over from the table to view for one particular dataset. For example,
    for 'ExampleDataSet' there are three jobs, i wan't it so these jobs are combined and named as 'ExampleDataSet' under a calculated column called 'Dataset'. For the following fields i would like it so that LastRunDate and LastRunTime are the time in whichever
    job was last to be intitiated is the date and time set. For Step_Status, there are three possible results, 'Running', 'Failed' or 'Succeeded'. If any of the three jobs are 'Running', then 'Running'. If neither are running yet one has failed then 'Failed'.
    Only when all three have succeeded should it then be set to 'Succeeded'.
    I hope i have made that clear enough, please feel free to ask any questions if not. I am relatively new to SQL but i thought to at least try least try (I knew it wouldn't work) and it didn't work. But it may give you a better idea of
    what i wan't:
    CREATE VIEW [dbo].[vw_DataAvailabilityAnalysts] AS
    SELECT CASE
    WHEN JobName in ('Job1','Job2','Job3') and step_status='Running' THEN 'Running'
    WHEN JobName in ('Job1','Job2','Job3') and step_status='Failed' THEN 'Failed'
    WHEN JobName in ('Job1','Job2','Job3) and step_status='Succeeded' THEN 'Succeeded'
    END as StatusCheck,
    CASE WHEN JobName in ('Job1','Job2','Job3') THEN 'ExampleDataSet'
    END as DATASET,
    LastRunDate,
    lastruntime,
    step_status,
    FROM [CDS_Common].[dbo].[DataAvailability]
    Many Thanks,
    Plain_Clueless
    Plain_Clueless

    Okay so here is what my table looks like (Simplified). There are four columns and the data within is extracted via a Stored Procedure.
    JobName
    LastRunDate
    LastRunTime
    Step_Status
    Job1
    11/06/2014
    09:30:00
    Succeeded
    Job1
    10/06/2014
    09:37:20
    Succeeded
    Job2
    11/06/2014
    04:05:00
    Succeeded
    Job1
    09/06/2014
    02:17:41
    Succeeded
    As you can see there are 3 jobs which are all 'Job1'. This jobs are obviously different within the table however this represents that they are jobs which all update the same DataSet within our local warehouse. Whereas Job2 updates a different dataset alltogether.
    I wan't to create a view which will alagmate the jobs that are of the same DataSet, which will disclude the column JobName but would create a whole new column that looks like this:
    DataSet
    LastRunDate
    LastRunTime
    Step_Status
    DataSet2
    11/06/2014
    04:05:00
    Succeeded
    DataSet1
    11/06/2014
    09:30:00
    Succeeded
    Bascically what this shows you is all the Job 1's combined so they are one record, Amaglamated. The last time any of these jobs were run is the LastRunDate & LastRunTime, which was the first record in the first table provided. Again for Step_Status,
    there are three possible results, 'Running', 'Failed' or 'Succeeded'. If any of the three jobs are 'Running', then 'Running' (Absolute). If none of the three jobs are running yet one has failed then 'Failed'. If one has failed yet another is also running then
    'Running'.Only when all three have succeeded should it then be set to 'Succeeded'. (This last bit isn't as important).
    Hope this clears it up a bit,
    Plain_Clueless
    Plain_Clueless

  • Can I combine multiple entries into a single statement?

    I am relatively new to Live Cycle so forgive my lack of technical wording.
    I would like to use multiple entry fields to fill in a statement.
    For example:
    I'd like the user to see this:
    Target Dropdown     Endo Dropdown     Type Dropdown     Version # Entry     Date 1 Entry     Date 2 Entry
    and then have the form merge all that together into a line that looks like this:
    RS_(target)_(endo)_(type)\(version)_(date)_(date)
    Preferably without repeating information on the page as we'll have multiple of these entries and the page will get hectic quick.
    Is this possible?
    I first had each dropdown in individual table fields, but due to regulations we follow the entries need to be merged without spaces.
    I always have a backup if this can't be done, but any help is appreciated.

    Not sure where you're sending it, but if you have a global variable named "bob".
    bob.value = "RS_"+target.rawValue+"_"+endo.rawValue+"_"+type.rawValue+"\"+version.rawValue+"_"+date.r awValue+"_"+date2.rawValue;
    Something like that should work.

  • To Combine Multiple STOu2019s into Single Delivery

    Hi,
    What are the configuration settings to be done to combine multiple STOu2019s into one single delivery in VL10B. 
    My requirement is to combine multiple STOu2019s contains different DELIVERY DATES and having SAME SUPPLYING AND RECEIVING PLANT into one single delivery.
    Thanks & Regards,
    Victor.

    Hi
    Delivery in STO is created for single order and for same delivery date, same delivery no. for different delivery date and  for multiple STO is not possible and its not logically correct,since after creation of delivery you will be doing picking and packing and Goods Issue.
    Please check
    Kishor

  • When combine multiple PDFs into one, some letters are missing and display wrong letter

    Hi all. I get a problem with combine multiple PDFs into a single PDF document. There are some PDF documents and they are working fine to open each document separately. But after I use Adobe Acrobat 8 Standard to combine them into one, some letters are missing and some display wrong letter (e.g. "forums" display "fo ums"). Our company has Adobe Acrobat 8 Standard, Adobe Acrobat 7 Professional and Standard. But all of them have some problem. Does anyone have idea for that? Please help me! Thanks very much!

    I have a similar situation, but my PDFs look fine in Acrobat Pro 8,Acrobat Reader 8, and Apple preview, but are missing letters in Acrobat Pro 7. I think it stems from the files being combined all having the same font, but each having a unique subset stored in the respective files, but with the same name (and ID?), and when they are combined, the character sets are getting hosed somehow.

  • Combine multiple drawings into ONE SHEET

    Hello, this is a question on Acrobat Pro, ver 8, using Windows XP. I guess I understand how to combine multiple files into a single PDF-file. However, this morning I happened to see the option mentioned in the subject line. When you go to "Combine files" > "Getting started with combined files" and select "CAD drawings" the description reads: "Combine multiple drawings into one sheet that's easy to navigate and print". How can this be done? I need to combine 8 ea CAD drawings (already converted to PDF) into ONE SHEET for printing without having the need taping 8 pieces of paper together. Arranging the drawing within the CAD application is not an option because the files were delivered by a 3rd party company and they only deliver PDFs

    Hi Priya,
      You can do this by merging the requets.
       1. goto Se10 and right click on the request and seelct merge requests.
       2. It will ask you from request and to request. Give the request names.
       3. After merging first request contents will be added to second request and
           first request will be deleted.
      Like that you can merge 3 requests to one request.
      Let me know if you want more info.  
    Thanks & Regards,
    Siri.

  • Combine multiple rows in single row

    I am new to SQL server and i am trying to combine multiple row in single row but i am not able to do it.Can anyone help me out?
    Input :
    Id |RED |BUY |BSW
    1328 NULL NULL 0.05
    1328 NULL 0.06 NULL
    1328 0.01 NULL NULL
    1328 0.05 NULL NULL
    1329 NULL NULL 0.05
    1329 NULL 0.05 NULL
    1329 0.05 NULL NULL
    Output
    Id |RED |BUY |BSW
    1328 0.01 0.06 0.05
    1328 0.05 NULL NULL
    1329 0.05 0.05 0.05

    Actually I am consolidating above result into text file and sending it to external system.Main aim is to remove NULL values and arrange the data as expected output.
    Also expected output can be
    Id         |RED   
    |BUY    |BSW
    1328        0.05   
    0.06    0.05
    1328        0.01   
    NULL    NULL
    Or
    Id         |RED   
    |BUY    |BSW
    1328        0.01   
    0.06    0.05
    1328        0.05   
    NULL    NULL
    for Id= 1328.

  • How to display results set of multiple reports into a single report table

    Our goal is to create a single report (or dashboard) that shows the "funnel" of object creations related to each campaign. The flow goes from Activity to Lead to Opportunity as well as multiple steps within each (ie. Unqualified Lead -> Qualified Lead, etc).
    We currently have 3 separate reports in three different subject areas, each reporting the different metrics and we would like to combine the output into a single Unified report.
    For example what we currently have is:
    Activities:
    Campaign Name # of Activities
    Campaign A 12
    Campaign B 26
    Leads:
    Campaign Name # of Leads # of Qualified Leads
    Campaign A 10 4
    Campaign B 20 18
    Opportunities:
    Campaign Name # of Opportunities # of Opps per Sales Stage ... # of Wins Closed Revenue
    Campaign A 3 2 1 $1,000.00
    Campaign B 10 8 3 $2,800.00
    What we want to see is:
    Combined:
    Campaign Name - Campaign Cost - # of Activities - # of Leads - # of Qualified Leads - # of Opportunities - # of Opps per Sales Stage - # of Wins - Closed Revenue
    Campaign A - $423.00 - 12 - 10 - 4 - 3 - 2 - 1 - $1,000.00
    Campaign B - $ 1,000.00 - 26 - 20 - 18 - 10 - 8 - 3 - $2,800.00
    We have tried using the "Combine with similar analysis" but the number of columns for each subject area differ. We also tried creating multiple UNION criteria (one for each column), but in the case of # of Opps per Sales Stage and Closed Revenue, those are not "Metrics" fields, so they won't combine.

    Hi, You may have to create some dummy fields to equate the no. of field in each of the report matching the data type too and get a one single report using combined analytics and then using the resultant data you can create a simple pivot like below. Haven't tried it before
    -- Venky CRMIT
    Hi Venky,
    I am facing the same problem. Can you please say Steps how to create resultant data and Combine in pivot Table .
    Please Help me .
    Thanks in Advance .
    My mail id is :
    [email protected]

  • __Is there a way to 'merge' multiple curves into a single curve?

    __Is there a way to 'merge' multiple curves into a single curve?
    By this I mean I have file with 2-12 curve layers - I wanted to 'merge' the curves so that I can end up with a single curve with the attributes of many. Maybe is there a script that would do this?

    I don't mean to be critical, but how do you get to a situation where you have 12 successive Curves layers?
    The advantage to a Curves layer is that you can adjust and re-adjust it to your heart's content.
    If you're habitually adding new Curves layers one over the other, maybe you should re-evaluate your process of working...  Perhaps the way you're thinking you should just work at a high bit depth and do repeated Curves operations on the pixels?  Or put some time into retraining yourself to not add a new Curves layer but to manipulate the one that's already there.  There are some nice new enhancements (e.g., the "finger" subtool that allows you to choose a spot in the image and manipulate that part of the curve).
    Again, I'm not trying to criticize you, just looking to see if maybe there's a way to avoid getting to the point where you need to combine Curves in the first place, since there's no direct "Merge Curves" capability, outside of just stamping a set of image and adjustment layers into pixels.  For completeness I suppose I should mention how to do that...  You can Stamp any combination of visible layers into a single layer of pixels (effectively combining all the Curves layers et. al.) by pressing Control - Shift - Alt - E.
    -Noel

  • Scan multiple pages into a single PDF document?

    How can i scan multiple pages into a single multipage PDF file?
    I've seen similar questions posted, but I haven't found any good answers. The only advice i saw was to scan each page as a separate PDF document, then merge them into a single PDF using third-party software.
    Obviously, i don't want to have to do that.
    I can't believe that there really is no way to do it using the existing HP print/scan utilities provided with the hardware.
    My printer/scanner is the "HP Photosmart 5514 e-All-in-One Printer - B111h", and i'm running Vista (64-bit) on an HP Pavillion notebook.
    This question was solved.
    View Solution.

    Hi,
    From the HP Scan software (Start > Programs > HP > HP Photosmart 5510 Series > HP Scan) select PDF and ensure the resolution is 300 DPI or lower.
    Ensure the Show Scan Preview option is checked and click on Scan.
    Once scanning the first page completes, place the next page on the glass and click the plus button below the scan preview...
    Once you are done click on Save.
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • Combining multiple photos into a panorama

    am i able to fuse multiple photos into a single panorama with iphoto? and if not is there a program for mac that will let me do this?

    Welcome to the Apple Discussions. Do you have a Canon camera? If so there an application, PhotoStitch, that came with the camera that is designed to do exactly that. It will be on the disk that came with the camera. Otherwise, one of the apps that Larry suggested will be required.

Maybe you are looking for

  • ITunes is lagging when I try to open it, syncing problems.

    Over the past week, Whenever I have tried to open up iTunes, I have gotten a message saying that Windows needs to configure iTunes. The thing is I have had iTunes for 4 months and I have not had this issue until now. Also, I added some of my music to

  • Sent mail not visible in Yahoo

    I'm sure this question is in the wrong community, but there isn't one dedicated to Apple Mail so here goes nothing. I have access to my Yahoo email account through the Apple Mail application. I can view, access and respond to all mail sent to my Yaho

  • LSMW for Purchase order

    hi all Can anyone tell me how STYPE (Batch Input Interface Record Type) is supposed to be filled out when using program RM06EEI0. Thanks in advance,

  • Security Permissions Violation in my application

    In my application rarely security permissions are violating what may be the reasons.

  • Issue while copying the std report into custom report

    Hi, I copied standrad program into Z program. In z program i am adding additonal selection screen as per the requirement. When i am trying to add the text in selection text for the input field system is giving warning message like change original lan