Best way to get different between two timestamp

Hi all is a simple question?
I want the different in days between 2 timestamp.
The timestamp can be of different year.
Any solution?

pedriky wrote:
Can be a solution form many situation?
long difMil = new Long( (timestamp1.getTime() - timestamp.getTime())+"");
int milxday = 24 * 60 * 60 * 1000;
difMil= difMil / milxday;Why the incredibly messy subtraction?
What's wrong with:
long difMil = timeStamp1.getTime() - timeStamp.getTime();
int days = (int)((difMil + 12 * 3600000L) / (24 * 3600000L));NB, if you don't round your division you can get problems where daylight saving time shifts the start of the interval forward an hour.

Similar Messages

  • Best way to get internet between two buildings???

    Hello all! I have some questions about a possible setup I am thinking of running.
    I have building that has internet coming into it. 15yds away, I have another building (which is brick) that has no internet options. I was thinking about buying two Airport Extreme's, making one the base and using the other one in the other building the access point for WDS. Then buy a couple of the Airport Expresses to push the signal throughout that building.
    Thoughts on this? Is there a better way to get internet between two buildings (without running cables) and then push it through out that building?
    I am open to any an all suggestions.
    Thanks,
    Grant

    Welcome to the discussions!
    Ethernet is always the best choice for signal strength and reliability. If you do not want to run ethernet cable to the second building, your options are down to ethernet powerline adapters and wireless.
    The ethernet powerline adapters work by transmitting the ethernet signal over the AC power line. The difficulty here may be that the other building is on a different electrical circuit, so it may or may not work depending on how the electrical wiring is configured. An electrician could run tests to see if this would work.
    The least reliable option is wireless. To have the best chance of working well, the "sending" and "receiving" routers need to be able to "see" each other through a window or other opening. Be sure to test with a laptop in the second location to see if you will have a strong enough signal to work with before you go this route.

  • Best way of sending signals between two VIs

    Hello all,
    I have two VIs. One that generate some complicated signals (sine wave, impulse, etc.). The other one takes manually inputted voltage and pressure send them out to some hardware with a pump, and reads back the output of the pump.
    What is the best way of sending the waveforms from the signal VI to the manual control VI? I still need to be able to control the signals manually in that manual control VI.
    Thanks.
    Solved!
    Go to Solution.

    nitad54448 wrote:
    hi
    For exactly this kind of process, I am using queues, FG and (relax ppl, I know..) global variables. If you are writting a global in one Vi and reading it in another (to prevent accidental (fake)updating); globals are easy to implement. Many people hate them (I do, sometimes) but for these kind of cases I think they are well adapted.
    For FG you need a user control and a vi for each variable you want to share... Both FG and globals are "bottle in the ocean" like of information : you send some info and sometimes this info will arrive somewhere...
    If you need to be sure that the info is passed then Queues are to be used...
    N
    While you may not run into race conditions using global variables in a write once/read many approach they do not protect you from some part of your application deciding to write to them. FG at least provide some level of protecting access while globals do not. In addition, global variables can create multiple copies of your data. If your data is large, this can be problematic. I much prefered using a defined messaging scheme. The intent is very clear and you can provide safe guards. Even FGs are better. I personally would never recommend the use of global variables even though some cases MAY work out. A defined API is always a prefered approach and helps to keep the code modular and decoupled. This leads to greater reuse. Global variables tie things together and make reuse more difficult.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Most elegant way to get difference between two tables - not minus!!!

    Hi,
    Simplified example of what I am trying to achieve - I have two tables ORIGINAL and REVISED.
    My desired result is to compare the two, such that; -
    Where data exists in both tables I get the difference between the Budget column, and if there is no difference then I want no rows.
    Where data exists in ORIGINAL but not in revised I want the inverse of the current value of the Budget column.
    Where data exists in REVISED I want the value from REVISED.
    I can see how I can do this, cf below, but is there a more elegant solution??
    Data for table ORIGINAL
    select '801040' entity, '2186' expense_type, 234000 budget
    from dual
    union all
    select '801040' entity, '3001' expense_type, 1000 budget
    from dual
    union all
    select '801040' entity, 'P132' expense_type, 34000 budget
    from dual
    union all
    select '801040' entity, 'P135' expense_type, 43000 budget
    from dualData for table REVISED
    select '801040' entity, '2186' expense_type, 235000 budget
    from dual
    union all
    select '801040' entity, 'P132' expense_type, 34000 budget
    from dual
    union all
    select '801040' entity, 'P139' expense_type, 56000 budget
    from dualDesired output
    ENTITY EXPENSE_TYPE DIFFERENCE
    801040 2186 1000
    801040 3001 -1000
    801040 P135 -43000
    801040 P139 56000
    5 rows selected.
    Current code to achieve this, is there a better way??
    select original.entity
    ,      original.expense_type
    ,       (nvl(revised.budget,0) - original.budget) as difference
    from   original
    ,      revised
    where  original.entity = revised.entity(+)
    and    original.expense_type = revised.expense_type(+)
    and   (nvl(revised.budget,0) - original.budget) != 0
    union all
    select  revised.entity
    ,       revised.expense_type
    ,       revised.budget as difference
    from   revised
    where  not exists
    (select 'x'
    from   original
    where  original.entity = revised.entity
    and    original.expense_type = revised.expense_type)
    and    revised.budget != 0Many thanks for your input,
    Robert.
    Edited by: Robert Angel on 17-Jan-2012 03:31 to change not equals to != - thanks for heads up

    Use full outer join:
    with original as (
                      select '801040' entity, '2186' expense_type, 234000 budget from dual union all
                      select '801040' entity, '3001' expense_type, 1000 budget from dual union all
                      select '801040' entity, 'P132' expense_type, 34000 budget from dual union all
                      select '801040' entity, 'P135' expense_type, 43000 budget from dual
          revised as (
                      select '801040' entity, '2186' expense_type, 235000 budget from dual union all
                      select '801040' entity, 'P132' expense_type, 34000 budget from dual union all
                      select '801040' entity, 'P139' expense_type, 56000 budget from dual
    select  nvl(o.entity,r.entity) entity,
            nvl(o.expense_type,r.expense_type) expense_type,
            nvl(r.budget,0) - nvl(o.budget,0) budget
      from      original o
            full join
                revised r
              on (
                      r.entity = o.entity
                  and
                      r.expense_type = o.expense_type
      where nvl(r.budget,0) - nvl(o.budget,0) != 0
    ENTITY     EXPE         BUDGET
    801040     2186           1000
    801040     3001          -1000
    801040     P135         -43000
    801040     P139          56000
    SQL> SY.

  • Best way to transfer file between two web apps

    I'm looking for some architectural suggestions. Seems like a simple problem, but I'm really struggling.
    -- Problem:
    We have two web servers, both running apps in JBoss. I need to pass a file of roughly 20MB from one server to the other, and get the other server to process it as soon as it receives it.
    -- Details:
    Seems simple enough... My plan was to write a web service to pass it. Our company is all onboard the SOA train. I wrote a service that encoded the file as a byte[] and passed it. Works amazing for small files, but throws an Axis OutOfMemory error when trying to base64 encode the file. I then looked at using attachments for web services, but dismissed that. It creates malformed XML since it treats the service as a multipart MIME message wraps the webservice inside. It quickly became messy and I couldn't get it working. Seemed to defeat the purpose of an XML service too.
    I've considered just doing a HTTP POST of the file to the other server, but that's poorly documented and a bit of a hack way to do it. I also considered just dropping the file in a web accessible folder, then using a web service to pass a URL and get the other server to retrieve it via HTTP. Again, not a very nice solution.
    Anyone have any suggestions? Thanks.

    Kimos2 wrote:
    I don't have access to run/configure services on these machines, so FTP is out. It has to be JVM to JVM. Even if I did, I'd have to worry about triggering JBoss to process the file right away after it had been dropped there. I know i could poll the directory or send a message to trigger the process, there'd be synchronization issues etc to work through and seems to introduce unneeded complication.Yes, I agree with that. Having been through the polling directories and grabbing partially uploaded files scenario ad nauseam. It's much worse with large files too.
    Barring any suggestions I haven't thought of, I'll probably end up settling on the HTTP POST solution. My problem is that it's providing a service without a specification and is not self-describing. No WSDL file to pass to clients that plan on using it. I would do HTTP POST as well. I didn't understand the part about "without a specification". You do have a specification, don't you? Wasn't this it: "I need to pass a file of roughly 20MB from one server to the other, and get the other server to process it as soon as it receives it." Informal, yes, but I don't have a problem with that. Post it to a URL on the receiving server and set up the receiving server to do whatever it's supposed to do with the file.

  • Best way to encrypt sockets between two servers

    Yellow, Im developing 2 server, both of them are in different places, they need to talk with each other. What do you recomend to encrypt theyr messages ? SSL ? Is there any way to identify Server A is really server A and he wants to start talking with server B and vice versa, no passwords are required here, is this possible ?

    Hi,
    You can use SSL with client authentication. With this approach, the server that is the current client (even though they are both servers, one will act as a client) can verify the server certificate of the other, it can then send a client certificate to the the server so that it is able to authenticate it.
    Cheers,
    Shane

  • Different ways to copy data between two schemas in one instance

    Hi there,
    I am searching a good way to copy data between two schemas in the same instance.
    Both schemas have an identical structure such as triggers, tables, views and so on. The only difference is the purpose: one is the productivity system and one is for development.
    I looked at datapump but I do not explicit want to export / import. I want to keep the data in the productivity schema as well as copy it to the other schema. Any ideas? I found out there is a copy statement but I dont't know how that works.
    Thank you so far,
    Jörn

    Thank you for your replies!
    I also thought of creating a second instance for development and move the dev - schema to it. I just don't know whether our server can handle both (performance?). Anyway the idea is to have a possibility to quickly rebuild the data inside a schema without indixes or triggers, just pure data. I thought the easiest way would be to copy the data between the schemas as they are exactly the same. However if you tell me DataPunp is the best solution i won't deny using it :).
    When you export data a file is created. does that also mean that the exported data is deleted inside the schema?
    best regards
    Jörn
    Ps: Guido, you are following me, aren' t you? ;-)

  • The best way to get 5.1 sound out of Mac Pro

    Hello. I'm not sure if this is the right place to ask this, but could someone recommend me the best way to get 5.1 sound of a Mac Pro. Since I don't require hi-fi -level sound, just simple directional audio for gaming and such, I wouldn't like to pour a lot of money to this. As I see it, I'd need an external sound card, internal PCI-E soundcard or speakers that have an optical input. I would like for the cost to be in two digits, euro or dollar.
    Any suggestions about hardware?

    Once again, the issue of 5.1 w/Apple comes up.
    Here is the bottom line.
    You will only get 5.1 audio if the following conditions are true:
    - You are using the OPTICAL output on your Mac
    - You are playing a DVD with a 5.1 soundtrack
    That's it. The simple truth is, that even if you have a Z-5500 setup (like I do), you still will not get 5.1 surround in ///any/// applications other then while playing a DVD.
    There is no way to get 5.1 out of a game on a Mac Pro. No matter how much money you throw at it. The support simply is not there. It is not a software issue, it is not a driver issue. It is the game developer's issue (sort of), and it is a //lack of hardware// issue.
    The complex truth, and I will attempt to explain, isn't that simple.
    Your Mac Pro or Macbook only has a single line-out, that supports 2 channels at the maximum. Optical audio will only handle 2 channels as well- it's the same signal (in two channels) on a different medium, basically.
    All PC soundcards that support proper 5.1 (save for a select few) have //multiple// line-out jacks for Front Left/Right, Center/Sub, and Rear Left/Right (3 plugs total for 5.1). Since your Mac/Mac Pro doesn't have this, you can't hook up a 5.1 speaker set and expect true 5.1.
    You do have optical audio, however, this only works in 5.1 when a Dolby Digital signal is piped through the optical cable.
    Dolby Digital works by encoding a 5.1 signal as a data stream, sending it to a receiver, where it is decoded and played back as 5.1 stereo. DVD's have this audio pre-encoded on the disk.
    If you wanted 5.1 output from your games, they'd need to ether have the sound/audio data encoded as Dolby 5.1, or support encoding on the fly to take a 5.1 signal, encode it, and pipe it out the optical audio plug. Xbox360 does this, because they've licensed the technology from Dolby- as have the game developers.
    Unfortunately, none of the developers for Macintosh gaming have yet to include live Dolby 5.1 encoding (I think Doom 3 had a beta patch that did- I could be wrong).
    If the game doesn't support the above feature, then you only get basic 2 channel audio.
    *Do not buy a Fireface 800.*
    This is a professional audio interface (like an external soundcard). While it supports 5.1 output via 6 individual outputs, you need SPEAKERS that have +built in amplifiers+ (called a Studio Monitor). Not just one amplifier- all the speakers have it built in and take a balanced stereo input.
    You're looking at $1300 for the Fireface 800, and another $200 per speaker. This is not cheap, is not meant for gaming, and is not consumer grade equipment. It's pro audio, designed for Logic 8 and similar.
    Even if you did spend the money, trust me, I'd know... I have a 5.1 setup running through an Apogee Ensemble (a $2000 "soundcard"), and I do not get 5.1 support from Quake 4, C&C 3, or any other game. I only get 5.1 surround from my audio production in Logic 8.
    To recap, since this has been asked many times- and I don't want you wasting your money here (just trying to be helpful!)...
    *There is no simple or cost-efficient way to get 5.1 from your Mac, other then while playing a DVD movie.*
    I would highly recommend that you buy a very good pair of 2.1 speakers with a Sub woofer. Maybe even a pair that takes an optical input for audio. If you really want to spend the money to *watch a DVD in surround sound,* then you can... And it'll work wonderfully, but gaming will not give you surround sound at all.
    *Again- There are no games out that support 5.1. Just because you technically support Dolby 5.1, doesn't mean the applications are aware of it and can utilize the 5.1 surround.*
    Edit: I may have neglected to also mention that the Firewave unit will support 5.1 properly through 3 separate plugs (much like a PC soundcard does), however the only game I am aware of that supports this is Unreal Tournament 2003 for Mac (or was it 04?), with an experimental patch for 5.1 via OpenAL. Last I heard, it worked okay, but crashed occasionally.
    Most of the other games out there just don't support 5.1, period (probably due to the lack of hardware on the Mac computers from the factory).
    -SC
    Message was edited by: ScottishCaptain

  • Best way to get LARGE (multi-DVD) project to show on a TV?

    My wife has compiled an iMovie '09 project that has about 42 hours worth of dance videos.  The project consists of many clips of all sorts of esoteric dancing, with a brief fade between each one.  It looks fine on her iMac.  She wants to show these videos on a TV at the "Dance Ladies Retreat" that is coming up in a couple months.  Some ideas we've considered are:
    Buying her a new MacBook, and moving the iMovie project over via Firewire, Ethernet cable, or similar.  Then taking the MacBook to the event, and hooking it up to the TV via cable.  This method will be very expensive.
    Saving the project on a 256 giga-byte USB drive.  First we'd have to get this mondo iMovie project into a format that would work on a PC laptop, which could then be attached to the TV.  Not sure how to get the iMovie project into a PC-readable format.
    Break the mondo iMovie project up into DVD-size chunks.  My wife bought Aimersoft DVD Creator, which we may try to use if we decide to split the iMovie project up into a number of DVDs, but I'm not sure if it can merge movie clips.
    Any ideas would be appreciated.
    Thank you
    ATB

    Geoff: Thank you for your reply!  I downloaded VLC Player and was able to read a DVD's worth of my wife's project that she had copied onto Aimersoft's DVD Creator software.  First I saved the Aimersoft DVD Creator file onto my flash drive, and tried to play it on my PC with Media Player.  No joy.  VLC-Player worked like a champ!
    OK, now I need to figure out the next piece of the puzzle, which is the best way to get all of her work onto this single, 256 Gb flash drive that we have on order from Amazon.  The ultimate plan is to store the entire iMovie output onto the 256 Gb flash drive, and play it using my ASUS laptop through an HDMI cable.  Looks like we have two main choices for this:
    Copy all of her iMovie project onto DVD Creator, and save these onto the big flash drive.  This has the advantage of breaking her project up into manageable chunks, but will VLC Player be able to play those chunks sequentially?
    Stay with iMovie, and "share" her project onto the 256 Gb flash drive.  Maybe first we should split the huge project up into several smaller projects, perhaps 4 hours each.  A couple questions here: what do you think would be the nominal size for breaking up the huge project, and what would be the best option for saving the movie using "share."
    Thank you very much.  By the way, I found a nice explanation of the features and uses of iMovie 09 (that's the one we have) at this web site: http://www.kenstone.net/fcp_homepage/imovie_09_stone.html
    Thank you
    ATB

  • Getting text between two tag

    Hello,
    what would be the best method to implement to get text between
    two tags,
    eg <TEST1> this is a test </TEST1>
    as in; this is a test,
    i try to use BreakIterator, but it skip the tags,
    when i do word by word loop

    this is one way:
            String string = "<TEXT>This is the middle text</TEXT>";
            String x = string.substring(string.indexOf("<TEXT>") + "<TEXT>".length(), string.indexOf("</TEXT>"));

  • What is the best way to consolidate data on two Macs?

    Hi All,
    About to embark on a small project to move all my data on to my MacBook before finally saying goodbye to my trusty iMac.  In order to do this I'll be upgrading the HDD on the MacBook to a large one and using Time Machine to restore all the original data onto the new drive.  This bit I'm good with as I did it before when I upgraded the drive on my old iMac. 
    The main problem I have is that the majority of my photos, music, videos and documents are on my old iMac and I'd like to discuss the best way to merge these with a smaller amount of data that the MacBook has on it.  Both machines are running Snow Leopard and I'm not aware of any tools that are currently available to do something like this although I am aware that Lion is supposed to have features that would consolidate everything to the cloud and might make things quite easy.  This is something I would be willing to spend the £30 or so doing so if anyone has any experience of using Lion to merge everything across Macs to the cloud please let me know if you feel this would be a suitable approach.
    Just to summarise the state my data is in currently and the approach I currently intend to take. 
    Have the Mobile Me service so Mail, Address Book, Calendars and all that stuff are all synced across both machines anyway. 
    Applications - Some stuff on the old Mac that I no longer user but nothing here that I really want to migrate.  Some specific application stuff is mentioned below. 
    Movies - This is the bit that I'm most concerned about.  Have a lot of legacy iMovie stuff on the old iMac which I'd like to keep.  iDVD as well.  Not sure of the best way to get this across and maybe it even warrants a separate discussion. Aside from that most of my older video stuff and projects are on the iMac with the newer stuff on the MacBook.  I'm unaware of any function to export and import this but I have a large HDD which I can use to copy stuff over and am going to look into this a bit further.  There will be a small amount of duplication here but this is manageable. 
    Documents - Will just copy these across and organise them as and when I need them.  Again, a small amount of duplication but this is manageable. 
    Music - Pretty much all my stuff the old iMac.  Can just export this and copy it onto the MacBook. 
    Pictures - Bit complicated this.  Most of my stuff on the old iMac but some newer albums on the new MacBook.  No duplication so presuming I can just export the library off the old iMac and import it on to the new MacBook. 
    No websites or anything like that. 
    iPhone currently syncs with iMac but once I have all the stuff over it should not be too hard to change this. 
    Just my user account on each machine that I really want to keep.  Shared documents and other users accounts all contain temporary stuff that I'm happy to lose or archive. 
    Given this is anyone able to offer advice as to 1) Whether this is the best approach? 2) Have I considered everything? 3) Are there any tools that might help me?
    Many thanks,
    Tom

    OK, seeing as no-one replied (presumably because a lot of this information is on the forums in bits elsewhere) here's how I've got on so far.
    Applications - just went through them.  About the only one I needed was my media server app.  Just downloaded and re-installed, had a quick look back though my email to find the license key and it all went on fine.  Installation never seemed quite right on my old machine so solved that problem too. 
    Movies - New iMovies just copied across the clips and projects into their respective folders.  Seems to have worked but haven't checked it all that thoroughly.  Some duplicate footage here but I can trim this out at some point when I get a chance to go through here. 
    Documents - Just copied these across. 
    Photos - used an app called iPhoto Library Manager.  You can download for free but have to pay to use the part that consolidates your libraries.  Possibly if I was willing to spend a bit more time I could have got away without using this but given I didn't know the state of my different libraries and just how many duplicates I had this was too much of a convenience to ignore.  Also got my library into a state where I can now spend a few hours organising it a bit better with Faces / Events etc. 
    Not attempted Music or iPhone sync yet as been stuck trying to solve a problem with my power adapter. 

  • HT4260 I have an AirPort Extreme and a linksys router. What is the best way to get 6-8 wired connections with ac speeds?

    I have an AirPort Extreme and a linksys router. What is the best way to get 6-8 wired connections with ac speeds?
    Appreciate your assistance.

    The answer depends on whether the AirPort Extreme is your main router....or...the Linksys device is your main router.
    In either case, the two devices must connect together using a wired Ethernet connection using CAT5e or CAT6 cabling.
    Any version of the AirPort Extreme produced within the last 5 years will have Gigabit Ethernet ports. In order to get the same speeds from the Linksys router, it will also need to be Gigabit Ethernet capable.
    If you need additional Ethernet ports, you will need to add a Gigabit Ethernet switch to either the AirPort Extreme or Linksys router.
    It is assumed that your other devices connecting to the AirPort Extreme and Linksys router will also have Gigabit Ethernet capability.
    Not sure why you mention "ac" speeds in your post. This relates to wireless connections, not wired.

  • I burned a playlist to a data CD using itunes 11 but what is best way to get it import it into another computer with itunes running?

    I burned a playlist to a data CD using itunes 11 but what is best way to get it import it into another computer with itunes running?  I get an "X" when trying to copy to the "automatically add to itunes" folder on the 2nd computer.

    ok... so i i just made sure all my music is all together in 1 folder and i am going to trash my old music folder that is in the itunes folder... and follow your directions - let itunes start w/new library and bring my music in. Well, last little hurdle/question. I noticed that the place where my itunes library is - on an external drive doesnt have much space left on it. The place where i gathered all my music together in order to start fresh - is a different external drive and has LOTS of free space on it.
    SO... i now would like to just keep all that freshly compiled clean music right where it is but in advanced preferences I want to point to that new folder on the drive that has so much more space. So... should i delete the old music then go into itunes with a blank library and change the folder in preferences - quit and go back in and then follow your steps to loading my music? If i change the setting of where itunes looks for the music - that doesn't wipe out the old stuff... it just mixes it all up together right? I dont want that!!
    i promise this is the last question - i would love to fix this problem tonight and just be DONE!
    Thanks in advance for your patience and knowledge!!
    Lisa

  • What is the best way to get an update/status on my MBP repair?

    Apple store in Nashville had to send one of my machines to their repair depot in Tennessee due to the lid failing to open/close/latch properly. Any suggestions on the best way to get an update on the status of the repair (besides parking on hold with the store)? I was told it would take 4-5 business days and we are past that by two days now...
    TIA --
    Trent

    http://www.apple.com/support/repairstatus doesn't show QuickDrops (reference numbers start with the letter 'Q') - the store had to use this because Apple's back office systems were "down' when I dropped the machine off. Thanks for the input....

  • Best way to get data from multiple table

    hi
    i would like to know which is the best way of getting the data in the final table from multiple read statements which are inside loop.
    for exm
    loop at itab.
    read ....
    read....
    read....
    read ....
    data into final_itab
    endloop.
    thanx
    manoj

    Hi.....
    Say we are having two data base tables.. ZMODEL1 and ZMODEL2...
    Now decalre intrenal tables and work areas and before that structures for these two and also declare one final output table for display the data...
    >types: begin of ty_model1,
    >       za(10),
    >       zb type netwr,
    >       zc(10),
    >       zd(10),
    >       ze(10),
    >       zf(10),
    >       end of ty_model1,
    >       begin of ty_model2,
    >       za1(10),
    >       zb1(10),
    >       zc1(10),
    >       zd1(10),
    >       za(10),
    >       end of ty_model2,
    >       begin of ty_output,
    >       za(10),
    >       zb type netwr,
    >       zc(10),
    >       zd(10),
    >       ze(10),
    >       zf(10),
    >       za1(10),
    >       zb1(10),
    >       zc1(10),
    >       zd1(10),
    >       end of ty_output.
    >
    >data: t_model1 type standard table of ty_model1 initial size 0,
    >      t_model2 type standard table of ty_model2 initial size 0,
    >      t_output type standard table of ty_output initial size 0,
    >      w_model1 type ty_model1,
    >      w_model2 type ty_model2,
    >      w_output type ty_output.
    Now in the start of selection.. event...
    >select <field names in the same order as in database table> from zmodel1 into table t_model1 where za in s_comp. (s_comp is select-option for that field)>
    >if sy-subrc = 0.
    >select <field names in the same order as in database table> from zmodel2 into table t_model2 for all entries in t_model1 where za = >t_model1-za.
    >endif.
    After that now fill the final output table...
    >loop at t_model1 into w_model1.
    >  w_output-za = w_model1-za.
    >  w_output-zb = w_model1-zb.
    >  w_output-zc = w_model1-zc.
    >  w_output-zd = w_model1-zd.
    >  w_output-ze = w_model1-ze.
    >  w_output-zf = w_model1-zf.
    >
    >read table t_model2 into w_model2 with key za = w_model1-za.
    >if sy-subrc = 0.
    >  w_output-za1 = w_model2-za1.
    >  w_output-zb1 = w_model2-zb1.
    >  w_output-zc1 = w_model2-zc1.
    >  w_output-zd1 = w_model2-zd1.
    >endif.
    > append w_output to t_output.
    > clear w_output.
    > end loop.
    and now display the final out table...
    This is the best way..
    Thanks,
    Naveen.I

Maybe you are looking for