Best way to get the results

Hello all.
What I am attempting to accomplish is to take a database that has personal vehicle information and create a very specific format.
The Records in my table are singular per vehicle.
Code, First Name, last name, vehicle year, vehicle make, vin
PA002, Tom, Cusick, 09, Toyota, xyz1234
PA002, Tom, Cusick, 11, Chevorlet, yhn1029
PA003, Steve, Mangrove, 01, Ford, fff3345
PA003, Steve, ManGrove, 03, Ford, hhf2039
PA003, Steve, Mangrove, 06, Subaru, sed2234
What the receiveing company is looking for is a format of one record per individual with vehicles following...
Code, First Name, last name, vehicle year1, vehicle make1, vin1, vehicle year2, vehicle make2, vin2, vehicle year3, vehicle make3, vin3
PA002, Tom, Cusick, 09, Toyota, xyz1234, 11, Chevorlet, yhn1029
PA003, Steve, Mangrove, 01, Ford, fff3345, 03, Ford, hhf2039, 06, Subaru, sed2234
The first question is does anyone have suggestions on how to accomplish this ??? I was thinking of setting up variables in ODI but i don't know exactly how many vehicles any one individual might have registered in their name.
Then to add even more of a twist onto this they require that each record can only have 3 vehicles per record at most.
So if i had the following:
Code, First Name, last name, vehicle year, vehicle make, vin
PA002, Tom, Cusick, 09, Toyota, xyz1234
PA002, Tom, Cusick, 11, Chevorlet, yhn1029
PA002, Tom, Cusick, 01, Ford, fff3345
PA002, Tom, Cusick, 03, Ford, hhf2039
PA002, Tom, Cusick, 06, Subaru, sed2234
They want to see :
Code, First Name, last name, vehicle year1, vehicle make1, vin1, vehicle year2, vehicle make2, vin2, vehicle year3, vehicle make3, vin3
PA002, Tom, Cusick, 09, Toyota, xyz1234, 11, Chevorlet, yhn1029, 01, Ford, fff3345
PA002, Tom, Cusick, 03, Ford, hhf2039, 06, Subaru, sed2234
Anyone have any suggestion or ideas or thought or anything??
All suggestions and ideas are greatly appreciated.

In playing around and searching the web i have found a would be solution to my issue... but i have a question for the Gurus out there...
The following will work to get my information from Columns into Rows.
Select a.Membership_no,
MAX(DECODE(a.r, 1, a.vehicle_year)) v1_yr,
MAX(DECODE(a.r, 2, a.vehicle_make)) v1_make,
MAX(DECODE(a.r, 3, a.vehicle_vin)) v1_vin,
MAX(DECODE(a.r, 4, a.vehicle_year)) v2_yr,
MAX(DECODE(a.r, 5, a.vehicle_make)) v2_make,
MAX(DECODE(a.r, 6, a.vehicle_vin)) v2_vin,
MAX(DECODE(a.r, 7, a.vehicle_year)) v3_yr,
MAX(DECODE(a.r, 8, a.vehicle_make)) v3_make,
MAX(DECODE(a.r, 9, a.vehicle_vin)) v3_vin
FROM
select n1.Membership_no,
n1.vehicle_year,
n1.vehicle_make,
n1.vehicle_vin,
row_number()
OVER (Partition by n1.membership_no
order by null) r
from nsd_working n1) a
group by a.membership_no
order by a.membership_no
My question is... is there a way to convert this to be for 'n' number of records?
Can i some how use a variable in place of the number in the DECODE so I can count the number of vehicles and run the decode for that many records?
Thanks once again.

Similar Messages

  • Iphone 4s coming friday, what is the best way to get the notes content from iphone 4 to 4s without doing a restore? i want the new phone to be totally new but not sure how to get notes content across.

    What is the best way to get the notes content from iphone 4 to 4s without doing a restore? i want the new phone to be totally new but not sure how to get notes content across. If I do a restore as I have when previously from one iphone to another it has shown (in settings, usage) the cumulative usage from previous phones so all the hours of calls on all previous iphones will be displayed even though its brand new. Anyone know how I can get my notes (from standard iphone notes app) to my new iphone 4s without restoring from previous iphone 4. Thanks for any help offered.

    First, if you haven't updated to iTunes 10.5, please update now as you will need it for the iPhone 4S and iOS 5.
    Once you're done installing iTunes 10.5, open it. Connect your iPhone to iTunes using the USB cable. Once your iPhone pops up right click on it. For example: an iPhone will appear and it will say "Ryan's iPhone."
    Right click on it and select "Backup" from the dropdown menu. It will start backing up. This should backup your notes.
    Please tell me if you have any problems with backing up.
    Once you backup and get your iPhone 4S, you must follow these steps. If you don't follow these steps, you will not be able to get your notes on your new iPhone 4S.
    Open up iTunes again then right click on your device (iPhone 4S). Once you do you will see a dropdown menu. It will say "Restore from Backup..." Select this and it'll ask for a backup, select it from the dropdown menu. For example "Ryan's iPhone - October 12, 2011." Pick that and it will restore to your backup. Do this when you get your iPhone 4S so you will not lose anything. Even though you're restoring, you're getting back, since you're getting the previous settings, notes, contacts, mail and other settings from your old iPhone. You'll still have Siri though! So, restore when you first get it. Also frequently backup your device, as it will be worth it. You can restore from a backup if something goes wrong or save your data for a future update.
    Once you do that, you should have your notes on your new iPhone 4S and iOS 5.
    Please tell me if you need any help.
    I hoped I answered your questions and solved your problem!

  • Whats the best way to get the server name in a servlet deployed to a cluster?

              Hi,
              I have a servlet in a web application that is deployed to a cluster, just
              wondering what is the best way to get the name of the node that the server is
              running on at run time??
              Thanks
              

              Please try to modify the following code and test for your purpose: (check Weblogic
              class document for detail)
              import javax.naming.*;
              import weblogic.jndi.*;
              import weblogic.management.*;
              import weblogic.management.configuration.*;
              import weblogic.management.runtime.*;
              MBeanHome home = null;
                   try{
                        //The Environment class represents the properties used to create
                             //an initial Context. DEfault constructor constructs an Environment
                             //with default properties, that is, with a WebLogic initial context.
                             //If unset, the properties for principal and credentials default to
                             //guest/guest, and the provider URL defaults to "t3://localhost:7001".
                             Environment env = new Environment();
                             //Sets the Context.PROVIDER_URL property value to the value of
                             //the argument url.
                             if(admin_url!=null){
                                  env.setProviderUrl(admin_url);
                                  //Sets the Context.SECURITY_PRINCIPAL property to the value of
                                  //the argument principal.
                                  env.setSecurityPrincipal(username);
                                  //Sets the value of the Context.SECURITY_CREDENTIAL property to
                                  //the value of the argument cedentials
                                  env.setSecurityCredentials(password);
                                  //Returns an initial context based on the properties in an Environment.
                                  ctx = env.getInitialContext();
                             }else ctx = new InitialContext();
                             home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
                             ctx.close(); //free resource
                             // or if looking up a specific MBeanHome
                             //home = (MBeanHome) ctx.lookup(MBeanHome.JNDI_NAME + "." + serverName);
                             DomainMBean dmb = home.getActiveDomain(); //Get Active Domain
                             ServerMBean[] sbeans = dmb.getServers(); //Get all servers
                             if(sbeans!=null){
                                  for(int s1=0; s1<sbeans.length; s1++){
                                       String privip = sbeans[s1].getListenAddress();
                                  sbeans[s1].getName();
                             sbeans[s1].getListenPort();
                                                 WebServerMBean wmb = sbeans[s1].getWebServer();
                   }catch(Exception ex){
              "Gao Jun" <[email protected]> wrote:
              >Is there any sample code? Thanks
              >
              >Best Regards,
              >Jun Gao
              >
              >"Xiang Rao" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Sure. You can use the Weblogic management APIs to query ServerBean.
              >>
              >>
              >> "Me" <[email protected]> wrote:
              >> >
              >> >Thanks for your reply, i was hoping to find a better way for example
              >> >a class in
              >> >weblogic API.
              >> >
              >> >Thanks
              >> >
              >> >"Xiang Rao" <[email protected]> wrote:
              >> >>
              >> >>Physical: InetAddress.getLocalHost().getHostName()
              >> >>Weblogic: System.getProperty("weblogic.Name");
              >> >>
              >> >>
              >> >>"Me" <[email protected]> wrote:
              >> >>>
              >> >>>Hi,
              >> >>> I have a servlet in a web application that is deployed to a
              >cluster,
              >> >>>just
              >> >>>wondering what is the best way to get the name of the node that
              >the
              >> >>server
              >> >>>is
              >> >>>running on at run time??
              >> >>>
              >> >>>Thanks
              >> >>
              >> >
              >>
              >
              >
              

  • What is the best way to get the new iPhone/ iPhone 5

    What is the best way to get the new iPhone/ iPhone 5 when it is released. I want to get the phone as quick as possible. If i order it on The first day of pre orders will i get it on the same day as the release in stores? I'm on an unlimited data plan with AT&amp;T. Because the new iPhone will most likely have 4 g data will I loose the unlimited plan?

    Apple has not made any announcement.  We are not allowed to speculate on this forum.

  • Best way to get the values of local variables

    What is currently the best way to get the values of local variables. I know it is not currently possible to set watchpoints on local variables, but what are the best workarounds?

    You have to use StackFrame methods, eg, visibleVariables and getValues. To get a StackFrame for a thread, that thread has to be suspended, eg, by a BreakpointEvent.

  • What is the best way to get the end of record from internal table?

    Hi,
    what is the best way to get the latest year and month ?
    the end of record(KD00011001H 1110 2007  11)
    Not KE00012002H, KA00012003H
    any function for MBEWH table ?
    MATNR                 BWKEY      LFGJA LFMON
    ========================================
    KE00012002H        1210             2005  12
    KE00012002H        1210             2006  12
    KA00012003H        1000             2006  12
    KD00011001H        1110             2005  12
    KD00011001H        1110             2006  12
    KD00011001H        1110             2007  05
    KD00011001H        1110             2007  08
    KD00011001H        1110             2007  09
    KD00011001H        1110             2007  10
    KD00011001H        1110             2007  11
    thank you
    dennis
    Edited by: ogawa Dennis on Jan 2, 2008 1:28 AM
    Edited by: ogawa Dennis on Jan 2, 2008 1:33 AM

    Hi dennis,
    you can try this:
    Sort <your internal_table MBEWH> BY lfgja DESCENDING lfmon DESCENDING.
    Thanks
    William Wilstroth

  • Best way to get UUT result to Custom TestStand UI

    Hello,
    I am trying to get the results of my UUT to my custom UI.  I am already using the EndExecution Callback to tell my UI when the UUT is finished executing.  I was hoping ot use that same callback VI to tell my UI the result of the execution. 
    The EndExecution callback includes a reference to the execution.  I figured I could read the "ResultStatus" Property, which seems to report "Passed" or "Failed" correctly, but if I terminate execution, it is still returning "Passed", when I would expect it to return "Terminated". 
    Does anybody have any thoughts on what I am doing wrong or what might be a better way to do this?  I thought of just using a UI Message, but then that requires me to modify the client sequence and post the UI message with the results.  I'd rather have this work for all client sequences. 
    Solved!
    Go to Solution.

    I think you are looking for handling the UIMsg_ModelState_TestingComplete user interface message.
    Refer to the help:
    UIMsg_ModelState_TestingComplete–(Value: 34) TestStand process models post this message to the user interface after the MainSequence in the client sequence file returns control to the model. If the execution is not a batch controller or a parallel controller, the stringDataParam parameter specifies the UUT result status. If the execution is a batch controller or a parallel controller, the value of the stringDataParam parameter is Done. The numericDataParam parameter specifies the test-socket index. The activeXDataParam parameter contains a reference to the sequence context for the process model sequence file that posts the message.
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • What is the best way to get the minimum or maximum value from an Array of numbers?

    Let's say I have an Array of numbers: [2,3,3,4,2,2,5,6,7,2]
    What is the best way to find the minimum or maximum value in
    that Array?
    Right now, to get the maximum, I am looping through the
    Array, and resetting a variable to the value if it is greater than
    the existing value:

    Here's other approaches, the cookbook is your friend:
    http://digitalmedia.oreilly.com/pub/a/oreilly/digitalmedia/helpcenter/actionscript30cookbo ok/chapter5.html?page=7
    enjoy.

  • What is the best way to get the pixel brightness

    I have a gray-scale .png image. The pixel brightness is used to communicate the information that i need in my application. Note that i do not show this image in my application, the png file is only used to communicate data. Since this data is being collected as an image at the source we are using a png file to pass around this data. The code is given below
    JarEntry entry = m_jarFile.getJarEntry("imageFile.png");
    InputStream stream = m_jarFile.getInputStream(entry);
    BufferedImage image =  ImageIO.read(overlayImageFileStream);
    int cols = overlayImage.getWidth();
    int rows = overlayImage.getHeight();
    short[][] m_pixelBrightnessValues = new short[cols][rows];
    for (int i=0; i<cols; i++) {
         for (int j=0; j<rows; j++) {
              /** BEGIN: Takes too much time */
              int rgb = overlayImage.getRGB(i, j);
              // convert to HSB values.
              int red = (rgb>>16)&0xFF;
              int green = (rgb>>8)&0xFF;
              int blue = rgb&0xFF;
              float[] inputHSB = new float[3];
              inputHSB = Color.RGBtoHSB(red, green, blue, inputHSB);
              /** END: Takes too much time */
              float brightness = inputHSB[2];
              m_pixelBrightnessValues[i][j]= (short)Math.round(brightness * MAX_BRIGHTNESS_VALUE);
    }Some portion of the code above takes too much time. I have been tinkering with the following approaches:
    1). I can parse the png file myself and extract the brightness information thus bypassing the creation of the BufferedImage altogether.
    2). I can continue to create BufferedImage but find out a way to grab brightness directly from the buffered image.
    I prefer option 2, since option 1 will require that I figure out png format and then write custom png parsing logic. I have explored all the methods of BufferedImage and it seems there is no way of getting the HSB directly, the only thing readily availabe is RGB values.
    I would really appreciate any pointers (e.g. is there something in the Raster that can let me access the brightness data directly ?)
    -kashif

    I have a gray-scale .png image. The pixel brightness
    is used to communicate the information that i need in
    my application. Note that i do not show this image in
    my application, the png file is only used to
    communicate data. Since this data is being collected
    as an image at the source we are using a png file to
    pass around this data. The code is given below<snip>
    >
    Some portion of the code above takes too much time. I
    have been tinkering with the following approaches:
    1). I can parse the png file myself and extract the
    brightness information thus bypassing the creation of
    the BufferedImage altogether.
    2). I can continue to create BufferedImage but find
    out a way to grab brightness directly from the
    buffered image.
    I prefer option 2, since option 1 will require that I
    figure out png format and then write custom png
    parsing logic. I have explored all the methods of
    BufferedImage and it seems there is no way of getting
    the HSB directly, the only thing readily availabe is
    RGB values.
    I would really appreciate any pointers (e.g. is there
    something in the Raster that can let me access the
    brightness data directly ?)For a greyscale image, the R G abd B values are all the same, and the brightess is simply that value divided by the maximum value. You could create a brightness map in advance which is simply a 256 element array that maps an RGB value to a brightness:
            short[] brightnessMap = new short[256];
            for (int i = 0; i < 256; i++) {
                brightnessMap[i] = (short)(i/255.0f * MAX_BRIGHTNESS_VALUE);
            }Various experiments I performed using PixelGrabber, Raster and such didn't seem to speed things up more than 25% on a 1280 x 1024 image. Times went from around 400 milliseconds to 300.

  • Best way to get the entire history of User Activities

    Hi,
    We have a requirement to track the history (at least 1 year) of all the user activities. Currently we are using user stat which gives just 3 months history. Is there any other way to get the entire history?
    Heard about RBE.
    Can some one suggest on how to implement RBE? Can we use SAP database and GUI for RBE?
    Is there any other alternative?
    Thanks in advance,
    MR

    Switch on the Audit Log.  Lots of info here if you search on SM18/19/20
    Alternatively ask the Basis team to increase the retention of the log files so you can use ST03 for longer

  • I want to get good wifi in my house . I currently have a time warner modem/router separate from my phone modem but my upstairs does not get good reception. What would be the best way to get the best wifi if I started from scratch

    I have a combination modem/router from time warner that is separate from my phone line but I get bad reception on my apple tv an ipads upstairs in my house. I would like to fix this and want to know the best way to go about it . Whether getting two modems and routers or just one base station. Please help

    It is possible to extend a WiFI network using Apple's Airport Express, Airport Extreme Base Station, or even a Time Capsule. However  the router that is creating the network (the one you have downstairs) must be configurable to permit another WiFi device to extend the network. All Apple WiFi routers can be configured that way, but there are many third party WiFi routers that cannot. The two routers can be connected wirlessly or by ethernet. From your description I suspect ethernet would be prefereable if yoiu had a good way of routing the cable.

  • Is there a way to get the result of using multiple blending modes in one object?

    Hello,
    I wonder if there's a way to merge multiple objects with blending modes to one object. Here is the example:
    On the left rhere are three objects with the same appearence but different blending modes(color dodge, normal, overlay), on the right they are overlapped, which are still three object. I'm looking for the way to have the same result as the right overlapped one, but as one object. Having the same multiple objects only for the result of color blending mode uses too much memory for my computer.
    Thank you for your help in advance.

    create one object: then in your appearance panel, duplicate the fill twice. Select the top fill and expand the sub menu, click on opacity, choose blending mode. repeat.
    G

  • Best way to get the customer changes - CDHDR or IDOC

    Hi All,
    We have a new requirement to get the changes done for a customer/Material on everyday. We would like to know which way is better.
    Is it better to get the changes documents from CDHDR and CDPOS or generate IDOC's through change pointers and get the data from IDOC's. We want to know which one has a better performance ?
    Regards,
    Phanindra

    Hi,
    If you just want to extract the information for reporting, extract the data from CDHDR and CDPOS.  You can use function modules CHANGEDOCUMENT_READ/CHANGEDOCUMENT_READ_HEADERS/CHANGEDOCUMENT_READ_POSITIONS.  If you want to transfer the information to some other systems use IDOCs (with change pointer concept).
    Regards
    Vinod
    Edited by: Vinod Kumar on Apr 26, 2010 12:13 PM

  • What is the better and faster way to get the results

    I'm looking for suggestion for my application.
    I need to write an application where in certain section I need to do some checking for the SSN, I need to find if the SSN in table A is a duplicate in Table B.
    Table B consist of more than 1 million SSN and table A may have a couple of thousands SSNs.
    The SSN in table B consist of good and invalid SSN,such as, SSN with 000 on the first 3 digits or 00 on the second 2 digits or 0000 the the 4 last digits or even all 9 digits consist of 000 00 0000
    If I do the regular select SSN from table B where SSN = 'SSN_from_table_A" for 3 to 5 thousands records in a cf loop than it may takes awhile before I can see the result.
    Is there a better way to do this?

    alecken,
    Can you explain some more about the workflow of your application.  I'm not clear so to what is being returned to the client and what tasks are handled on the CF server, on the database server, and on the client's browser. Are you trying to return thousands or records to the client or having problems looping through thousands of records on the server.  Is the client providing a single SSN to check or are you comparing all values in TableA to TableB?   If possible could you post your CF and SQL code?

  • Where to install an SSD and best way to get the OS onto it

    I have a brand new Pavilion 500-281 with Win 7. I bouight a 128 GB solid state drive to load the OS onto it.  Where can I mount it inside the chassis? There don't seem to be any conventional drive bays.It came with an adapter plate with screws, but it isn't obvious where I could mount the thing!
    Also, can I simply run a restore to get the OS onto the SSD once I get it installed?  I got instructions with the SSD for ADATA software to copy an image of the drive, but all I want is the OS.  I'm dying to start using my new computer, but I figure I want to get the drive installed first before I make any changes to it.
    This question was solved.
    View Solution.

    Hi,
    Review message #8 in this thread.  Not all models of the Pavilion 500-2xx are provisioned for the SSD in the location as shown.  In the shown installation, an adapter plate was not necessary.
    Most of the SSD manufacturers have free migration software.  I suggest that you image the entire HD, all partitions even the hidden partitions.  Some of the newer migration software will allow you to exclude your data folders.
    HP DV9700, t9300, Nvidia 8600, 4GB, Crucial C300 128GB SSD
    HP Photosmart Premium C309G, HP Photosmart 6520
    HP Touchpad, HP Chromebook 11
    Custom i7-4770k,Z-87, 8GB, Vertex 3 SSD, Samsung EVO SSD, Corsair HX650,GTX 760
    Custom i7-4790k,Z-97, 16GB, Vertex 3 SSD, Plextor M.2 SSD, Samsung EVO SSD, Corsair HX650, GTX 660TI
    Windows 7/8 UEFI/Legacy mode, MBR/GPT

Maybe you are looking for