Can this be done with outer join?

Hi All,
I've two tables tab_a and tab_b. tab_a contains instruments and record_date columns apart from others. Each instrument can have many record_date ( say month end dates of the last year). These dates may or may not be same for other instruments . (i.e; say instrument1 has 12 month end dates of the last year while instrument 2 has quarter -end dates of the last year).
On similar lines tab_b has instruments and distribution_date & active_ind. Data in this table also bear the same relation as that in Tab_a. active_ind shows whether that distribution_date is active or not.
Note: tab_a.record_date and tab_b.distribution_date may not be same for the same instrument.
Now, I'm supposed to check whether tab_a.record_date matches with tab_b.distribution_date or not.
1) If it matches & if tab_b.active_ind is active then that record should be returned.
2) If it matches & if tab_b.active_ind is inactive then that record should NOT be returned.
3) If it doesn't match, then also that record should be returned.
To achieve this I did something like this, but it doesn't seem to be working.
I request you to help me in making it work for me.
Thanx!
select a.record_dt from tab_a a, tab_b b
WHERE
         b.active_ind(+) = 'A'
           AND  b.distribution_date (+)=  a.record_date
           AND b.instrument(+) = a.instrument_id

Table-A                          Table-B                                                Output
instrument     record_date     instrument     distribution date     Active_ind     instrument     record_date
1           01-jan-08     1            01-jan-08          I          
1           01-feb-08     1            01-feb-08          W          
1            01-mar-08     1            01-mar-08          A          1            01-mar-08
1            01-apr-08     1           01-apr-08          A          1            01-apr-08
1            01-may-08     1           01-may-08          A          1             01-may-08
1            01-june-08     1                                                    1                01-june-08
1            01-july-08     1            01-july-08          W          
2            01-jan-08     2            01-jan-08          I          
2            01-feb-08     2            01-feb-08          I          
2            01-mar-08     2            01-mar-08          A          2             01-mar-08
2            01-apr-08     2            01-apr-08          A          2            01-apr-08
2            01-may-08     2            01-may-08          A          2            01-may-08
2            01-june-08     2            01-june-08          A          2            01-june-08
2            01-july-08     2            01-july-08          A          2            01-july-08
2            01-oct-08     2            01-oct-08          A          2            01-oct-08
2            01-dec-08     2            01-dec-08          A          2             01-dec-08
3            01-july-08     3                                                 3               01-july-08
3            01-aug-08     3           01-aug-08          I          
3            01-sep-08     3            01-sep-08          A          3            01-sep-08
3            01-oct-08     3            01-oct-08          A          3            01-oct-08Expected out put is to get all the dates for an instrument from tab_a with b.status_ind 'A' plus dates not found in tab_b

Similar Messages

  • Have just migrated from the world of PC's. and I had my set up so that when I typed a new sentence it started with a capital with out me pressing shift. also, i could set up words to self fill like ur would auto correct to your. can this be done with mac

    Have just migrated from the world of PC's. and I had my mail text typing set up so that when I started  a new sentence after a full stop  it started with a capital with out me pressing shift. also, i could set up words to self fill like ur would auto correct to your. can this be done with mac

    I don't know about the first letter cap but the spelling is simple. Edit - Spelling and Grammar - Select While Typing and Correct Spelling Automatically.
    I'd also STRONGLY recommend that you bookmark and use:
    Mac 101
    Switch 101
    Find Out How Video tutorials
    List of Useful URLs for switchers
    Welcome to the Light side.

  • In Mail with Snow Leopard you could number your e-mails. Can this be done with Lion?

    In Mail with Snow Leopard you could number your e-mails. Can this be done with Lion?

    If you're referring to desktop icons, right click on the desktop > Show view options > check "show item information".

  • HT3819 everybody in my family has a different apple id, how can we share our music? can this be done with home sharing?

    everybody in my family has a different apple id, how can we share our music? can this be done with home sharing?

    Setting up Home Sharing for Apple TV (2nd and 3rd generation)
    iTunes- Setting up Home Sharing on your computer
    iOS- Setting up Home Sharing on your device
    Troubleshooting Home Sharing
    iTunes- How to share music and video
    iTunes- How to share music between different accounts on a single computer

  • HT1694 I need toi sync my personal Outlook calendar to my iPhone 5, can this be done with a non-server system?

    I need toi sync my personal Outlook calendar to my iPhone 5, can this be done with a non-server system?

    You're welcome.
    Have you never synced your iPhone with iTunes on your computer to transfer music and any other iTunes content from your iTunes library on your computer, or to transfer photos from your computer to your iPhone, etc.?
    What I'm referring to is your iPhone sync preferences with iTunes on your computer, not any setting on your iPhone.

  • Can this be done with css rollovers?

    Hi,
       I'm using Dreamweaver CS4 on a Windows PC. I understand the basics of css rollovers where you change the background image position up or down but the text used will still end up being a common font that will suit every pc. What I'd like to do is use an uncommon font in my navigation bar. I made an image in photoshop that had two versions of a word like home for example one on top of the other like you would for a css rollover but once I created a link I had the link color border around the image, so it didn't work. Here is a link to a website that is similar to what I'm trying to do http://www.inksmithtattoo.com/. Look at the navigation, can this be done using css rollovers? If not how do you think it was done? Is there a way to use uncommon fonts in a navigation bar? I even did some research on using Dreamweavers hotspot function but found that there were issues in using it for navigation. I'm getting pretty familar with Dreamweaver but I'm not that good at coding so if anyone does have any ideas please include some keywords that I can google and read more about what your trying to say, links to the info would be even better but I realize that if your as busy as I am you can't take that kind of time.
    Any ideas or help will be greatly appreciated.
    Thank you to all,  dluthier

    That site is using images only. It is not a text based link:
    here is the css they are using:
    #navAbout a {
    -moz-background-clip:border;
    -moz-background-inline-policy:continuous;
    -moz-background-origin:padding;
    background:transparent url(../_img/navAbout-Home.gif) no-repeat scroll 0 0;
    left:473px;
    top:318px;
    As you can see it is an image only. See the attachment with this post. Also since it is a background image it won't show up if you right click on the so seemed text
    Please install firebug or webdeveloper plugin if on Firefox and you will be able to inspect the elements and know what exactly they are.
    Hope it helps
    Regards,
    Vinay

  • Develop streaming data processing applications in C# with Stream Computing Platform and Storm in HDInsight. Can this be done with Visual Studio Community sign up?

    Hello,
    I am a  student and love the Visual Studio Community 2013 to implement some of my research projects. I am currently working on a project that involves streaming data analysis. I found this article ( http://azure.microsoft.com/en-us/documentation/articles/hdinsight-hadoop-storm-scpdotnet-csharp-develop-streaming-data-processing-application/
    ) but do not have MSDN subscription (I cannot afford it)  as required in the article. Can this be done somehow with Visual Studio Community 2013 sign up?
    Thank you all in advance for your time and for your help.
    J.K.W

    Hi,
    I just confirmed that the key with Visual Studio Community is that, although it is free like Express, it does not have the limitations that Visual Studio Express had. So, to answer your question, Yes - you can do all your development work as a student with
    VS Community 2013 sign up. You can also refer to this blog for more details -
    http://blogs.msdn.com/b/quick_thoughts/archive/2014/11/12/visual-studio-community-2013-free.aspx
    Regards,
    DebarchanS
    DebarchanS - MSFT

  • Bookmarking video: Can this be done with QT server?

    I am considering a hosting service that has QT streaming.
    I'd like a capability similar to DVD chapters for my on-line video, with links in the description under the video that will go to a specific time code or bookmark on my video.
    Can this be done?
    Thanks,
    Cris

    I did look up the LiveStage web site to see what that is all about. The example sites were all VR, panoramic, displays all of which is very impressive but not what I need. I couldn;t get your movie to display properly, so I didn't see what is supposed to do. I do thank you for pointing me toward something I hadn't seen before which is totally cool.
    Many quicktime movies I have found on the web which claim to be streaming are really progressive download. I can't position the cursor ahead of what has already downloaded. Those that actually do stream and buffer well will allow me to jump about anywhere on the time line.
    When I drag and click or simple click somewhere on time line using the controls of the Quicktime browser plug-in, the movie will buffer and start playing at the chosen location.
    Obviously, there is communication with the server. I just want more control over than communication. I'd like to be able to send a command to the server telling it to go to a particular frame or time code and start buffering and then playing from that specified time.
    It seems so obvious. I can't believe that there isn't a script to do this.
    There are Apple Scripts that control navigation in Quicktime Player, scecifically "Move to X in front movie" Apple Script. It works with Quicktime Player on files stored on my computer.

  • Can this be done with Spry?

    I've got a page that has some menu items displayed in a Flash
    movie. (See this page
    http://www.lunchboxes.ae/offices/samplemenu.php
    for the example).
    Can this be done using a Spry dataset that can be changed
    using Contribute ultimately rather than editing the Flash movie
    every time?

    Hello,
    You should try to look deep in to the source of this:
    Original
    Photo Gallery from the Demos
    Ther is a slide show option. you can put this technique in to
    a table in many times and it will look like what you need.

  • Can this be done with flash

    I need to generate a chart using flash or flex (im not sure
    which) on the
    server side and output it as a jpg?
    can this be done? can somebody point me to the right
    direction
    Thanks,
    Tem

    You mean using data from the server? Flash, and Flex, run
    client side, but
    can pull data from a server - and make a graph. I don't know
    Flex, but it
    wouldn't be too hard in Flash. AS3 is better for outputting
    as a JPEG, but
    it can be done in AS2 as well.
    There are many tutorials for loading data into Flash, just
    Google things
    like 'Flash XML' or 'Flash Database'. I'd also recommend
    looking at AMFPHP
    http://www.amfphp.org/) an
    alternative to Flash remoting that makes calling
    server-side functions, and passing data, a snap.
    For image export, search on 'Flash image output' - here's one
    to get you
    going:
    http://www.quasimondo.com/archives/000645.php
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Can this be used with out a internet connection?

    Can this be used without WiFi? Like be used as an external hard drive?

    You cannot plug in to the USB as many people would like to do. It can only be used as network drive.
    If the TC is not going to be part of the network.. just in bridge to the main router is fine.. then it is very hard to set two networks. It is possible but as g_wolfman has stated, it is far from great in that role.. USB drives are cheap as, faster than TC and more reliable with TM.

  • Can this be done with a view ?

    I want to create a view which contains data from many table.
    The tables are arranged as such :
    1 parent table and 5 child tables.
    Each child tables contains a foreign key which equals a primary key of the parent table.
    Theoriticly there is a limit of 9 entries in a child table for each entry in the parent table.
    Is this possible to have a view which contains 9 fields for each of the 5 child tables, fields which will either by empty/null in the view or contain data from the parent table if not ?
    I know this is really a mess and not a great thing to do at all. But I must interface with a third party COM objects which expects to find a table or view with these specifications, which leaves me 2 choices :
    1- create such a view, if it can be done ( I don't see how it can be done right now )
    2- Change my database so I have a table which has 9 times 5 fields most of which will be empty ( yuck ! )

    If I understand correctly, you have
    MIX
    mix_id
    other_columns
    and a bunch od constituent tables something like:
    mix_id,
    type,
    dosage.
    Assuming that the type column in constituent maps to one of the columns you want to create in your view, then something like:
    SELECT m.id, m.other_columns, c.c1d1, c.c1d2. c.c1d3, c.c2d1, c.c2d2. c.c2d3,
           c.c3d1, c.c3d2. c.c3d3
    FROM mix m,
         (SELECT id, MAX(c1d1) c1d1, MAX(c1d2) c1d2, MAX(c1d3) c1d3,
                 MAX(c2d1) c2d1, MAX(c2d2) c2d2, MAX(c2d3) c2d3,
                 MAX(c3d1) c3d1, MAX(c3d2) c3d2, MAX(c3d3) c3d3
          FROM (SELECT id, DECODE(const_type,'t1',dosage,NULL) c1d1,
                       DECODE(const_type,'t2',dosage, NULL) c1d2,
                       DECODE(const_type,'t3',dosage,NULL) c1d3,
                       NULL c2d1, NULL c2d2, NULL c2d3,
                       NULL c3d1, NULL c3d2, NULL c3d3
                FROM constituent1
                UNION ALL
                SELECT id, NULL, NULL, NULL,
                       DECODE(const_type,'t1',dosage,NULL),
                       DECODE(const_type,'t2',dosage, NULL),
                       DECODE(const_type,'t3',dosage,NULL),
                       NULL, NULL, NULL
                FROM constituent2
                UNION ALL
                SELECT id, NULL, NULL, NULL, NULL, NULL, NULL,
                       DECODE(const_type,'t1',dosage,NULL),
                       DECODE(const_type,'t2',dosage, NULL),
                       DECODE(const_type,'t3',dosage,NULL),
                FROM constituent3)
          GROUP BY id) c
    WHERE m.id = c.idshould be close to what you need. If you will always be querying the view for a specific mix_id (or maybe only a few), then an alternative might be:
    SELECT id, other_columns,
           (SELECT dosage FROM constituent1 WHERE type = 't1' and id = m.id) c1d1,
           (SELECT dosage FROM constituent1 WHERE type = 't2' and id = m.id) c1d2,
           (SELECT dosage FROM constituent1 WHERE type = 't3' and id = m.id) c1d3,
           (SELECT dosage FROM constituent2 WHERE type = 't1' and id = m.id) c2d1,
           (SELECT dosage FROM constituent2 WHERE type = 't2' and id = m.id) c2d2,
           (SELECT dosage FROM constituent2 WHERE type = 't3' and id = m.id) c2d3,
           (SELECT dosage FROM constituent3 WHERE type = 't1' and id = m.id) c3d1,
           (SELECT dosage FROM constituent3 WHERE type = 't2' and id = m.id) c3d2,
           (SELECT dosage FROM constituent3 WHERE type = 't3' and id = m.id) c3d3,
    FROM mix mIf you will generally be selecting all rows out of the view, then this will likely be very slow if mix is large, since each of the column queries wil be executed once for every row in mix.
    HTH
    John

  • Drag and drop images into anchored frames -- can this be done with the images imported by reference?

    My company bought a product from another company and the only manuals files that came with it were in pdf format. I am currently grabbing text out in Acrobat, then pasting and reformatting it in FrameMaker. Boring and tedious. . . .
    Eventually I get to the point of importing the illustrations. There are *hundreds* of them. As a rule, we import the files by reference, to keep the chapter size smaller and to be able to double click the image to open it for modification.
    However, I can drag an image file from the folder window and drop it into an anchored frame. Oooh, this is fast--way faster than all the mousework that goes into clicking file>import>file>[choosing the file then hitting the import button].
    But, dang it, that copies the image into the FrameMaker file. No double-click opening. Giant fm. file size. Mad boss, shaking an SOP standards sheet in my face.
    So, my question: Is there a way to import an image *by reference* by dragging and dropping them into an anchored frame?
    Thanks, folks.
    Moore. Matt Moore.

    I tried the RTF route and, in addition to getting the body text I wanted, got paragraph after paragraph of the page numbers, the illustration text, the header and footer verbiage, all randomly placed between body text paragraphs.
    I did the same file twice, once by saving as RTF and deleting unwanted stuff, then repairing body paragraphs (each line of which is a seperate paragraph in the RTF file) and also by sweeping only the necessary text, then copying and pasting it page by page. The second method was a bit faster and less frustrating. Not to say that it isn't slow and frustrating in itself, but just a bit less. Less errors, too, with the second method.
    Bummer about importing by reference. I don't suppose there's a way to set up recorded actions with hotkeys, is there? Like in Illustrator?
    Thanks, Art.
    Moore. Matt Moore.

  • Can this be done with any plugin 3rd party app?

    I have some footage of various 'technical components'. I need to do a commentary - which is no problem.
    I also would like to add arrows, lines, etc to point out various parts in some of the close-up shots. I know I can't do this with iMovie 08, but are there any apps (for 08) that will (with a demo).
    Or is that something FCE would do?

    Apologies. What a brain cramp. Yes, that's a windows product. To my surprise, Googling, I don't see Mac options. Other products like Captivate also are Windows also.
    Check into Impatica (www.impatica.com). I haven't used that in years, and it used to be ppt-centric, but they seem to have some other versions, and they have Mac support according to http://www.impatica.com/support/guides/.
    SnapProzX is a mac oriented tool for taking screen cams, so it would capture your movements on the desktop, but I don't think it supports "post product" such as adding in arrows or call outs later, but I haven't played with it enough.
    Overall, this discussion forum is for iMovie and video editing. What you are looking for is a bit beyond video editing, and into instructional design.

  • Can this be done with LR4 and Drobo FS?

    When I import pictures on my MacBook Pro running Lion OS  at home into LR4, I set it up to backup onto my Drobo FS which is a NAS device wirelessly via my home network.
    Not being computer saavy at all, can I set up both my Drobo and configure LR4 on my MBP so when I am on vacation with the laptop, I can back up my vacation pics directly to the Drobo rather than carrying an additional external back up drive?
    I've heard about Drobo apps, specifically Pure ftd, downloaded it and looked at the documentation but it might as well be written in Martian. Is this the way to go or is there another software program?  I think pure ftd enables one to access your device, in this case, the Drobo, via the Internet. As I don't know anything about programming, I am completely lost when reading various forum threads about the set up. 

    Yes, that is exactly the problem with all cloud services for photo backup: how much volume do you shoot per day? What is the upload bandwidth you may count on?
    I dropped any such notion, because with a daily volume of 3-6GB raw images all the hours of the night would not be sufficient to upload this via the usual ADSL-lines in Europe.
    Directly within LR you can use any setup that you can select in the import dialog as storage destination for "make a second copy to".
    E.g. If you can map your drobo as a drive.
    If not, you could still use the ftp-mechanism to trigger the upload outside LR, after copying the images from your camera card.
    But as said, all depending if your volume will make the upload during the time available at your bandwidth.
    Cornelia

Maybe you are looking for