JOIN usage problem

Hi,
I have a column named count coming from a set of tables, and i want to compare this with a count from a different temp table which cannot be joined by a "JOIN" statement as they do not share a relationship.
When I write a query without a "JOIN" keyword Im able to get the data as expected.
select count(a.name),count(a.name-d.count) from table a,table b,table c,table d
where a.id=b.id
b.id=c.id
and a.name=d.name;
When I use a join for the same condition, it does not resolve(ORA-00904) since table d has been declared in a sub query in the exists clause.Can some one help me rewrite my join query approach.
select count(a.name),count(a.name-d.count) from table a
JOIN b.id=a.id
JOIN c.id=b.id
and exists(select d.name from d where d.name=a.name);

Thanks for the reply. I was trying to use JOIN and was under the incorrect impression that JOIN has to be used with a primary key/not null field of a table.
and did not try the below statement unlike for the other JOINs
JOIN d ON d.test_name = a.name.
Is JOIN safe to use on any data type like number,varchar irrespective of whether or not there is a foriegn key relationship? My d table merely has data which matches the "a" table and does not have a foriegn key relationship.
like
Table a
id 12345
name Apple
Table d
test_name Apple

Similar Messages

  • I'm trying to resolve a battery usage problem

    I'm trying to resolve a battery usage problem on my iPhone 5S ...
    Have been working with an Apple agent via chat and I'm 99% certain it's a software problem, but I can't isolate wish software ...
    So, I'm going to set up my iPhone up as new (when I did this as part of identifying where the problem is, it help its charge for 24 hours) but I have a problem with photos ...
    I can see photos on my iPhone (restored from an iCloud backup) up to date, but on my iMac/iPhoto with my iPhone attached i) I can only see photos on my iPhone up to a date in the past (mid October 2014) and ii) iPhoto says all photos have already been imported ...
    How can I (can I) get the more recent photos onto my iMac e.g. into a folder and then import them from there into iPhoto?
    Also, why is the restore from an iCloud backup taking so long (it's been 14 hours now) when I'm pretty certain everything's now there that should be?

    Just to add ... my real problem is that I can see photos on my iPhone, but in iPhoto with the iPhone connected, I can only see photos up to a certain date - weird?!!!

  • New airport: can't get my macbook or my imac to join my wireless automatically, my other stuff still joins without problems but i have to join manually with the book and the imac ?? I've tried all the settings and every thing else I can think of.....

    new airport: can't get my macbook or my imac to join my wireless automatically, my other stuff still joins without problems but i have to join manually with the book and the imac ?? I've tried all the settings and every thing else I can think of.....
    Running on Lion, never had a problem before until the old airport died and I replaced it.

    try connecting the device in _*recovery mode*_, then restore from your backup.
    also, make sure [_*Apple Mobile Device Service*_|http://support.apple.com/kb/TS1567] is installed and started.
    JGG

  • Left outer join usage in obiee BMM layer

    Hi All,
    We lately started using left outer join in our bmm layer , to meet the requirement expectation .
    problem : We have two tables  Fact A , Dim B . There is an join int_id column to join them . Problem is... in table Dim B , we have 3 millions rows of Int_id and in fact table it is loaded for only data available(1 million rows).
    Due to this we are dropping rows  in the report ..as it is only getting data where fact.int_id = dim.int_id. So we used left outer join to solve to one particular report .(we know we can do ETl to load dummy int_id and make it null , but it is huge effort ..so we did left outer join)
    These days , same kind of reports are in requirement . if i keep on doing same left outer join to meet the requirement in BMM layer ? is there any disadvantages due to this ? any performance degrade due to this ? please throw few lines on left outer join and its usage ?
    Thanks,
    Sri

    Remodel your tables that might be a partition or any other way and follow in BI as per your new model.
    Simply: Go for ETL kind of solution

  • High memory usage problem

    Firefox regularly creeps up to about 350 mb of memory usage. It runs poorly, crashes, etc. I read some other posts about how to reduce the its memory usage via about:config tweaks. I made adjustments to browser.cache.disk.capacity (was set to over 1,000,000, reduced to 50,000) and config.trim_on_minimize. However, memory usage has not decreased. I also see the value browser.cache.disk.smart_size_cached_value;1048576. I changed this to 50,000 also, but it reverts to the original number after every restart.
    I have 3 tabs open right now (Hotmail, Google, and this page) and memory is at 242,000.
    I should also note that I recently reformatted my hard drive. Firefox has almost no extensions or plug-ins installed (other than things like Flash and Silverlight). I'm running Windows 7 64-bit, and have 6 gb of RAM.
    Any suggestions for alleviating this problem would be greatly appreciated.

    235 to 285 MB seems to be a rather low notification threshold on a PC that has 3GB installed, not even 10% of RAM being used and that message is triggered.
    That's a new feature in AVG, and I suspect it might need a little tweaking. Unfortunately AVG didn't seem to provide any user adjustments into that feature, so the best thing to do is turn it off if that warning message appears too often.
    Here's an AVG support thread where the users says he gets that message with IE, Chrome, and Firefox. <br />
    http://forums.avg.com/us-en/avg-forums?sec=thread&act=show&id=180124

  • Iphone 5 - anyone having huge cellular data usage problem on ATT

    I upgraded from Iphone 3g to Iphone 5. Over a period of last year, My average monthly data usage is approx 400MB (total less than 5GB in a year). AT&T is reporting that my Iphone 5 data usage crossed 6GB in a 3 day period . I called AT&T and have to listen to LTE, Iphone 5 and Multiple app running in background  non-sense as an explanation for 6GB data usage over a 3 day period. My Itune and app store does not download over cellular network. Even though Iphone 5 automatically creates an Icloud account during initial setup, I am not connected to Icloud on Iphone and never even logged on to Icloud account. IOS 6 setting for sending data diagnostic over cellular network is set to no.
    I feel this is same bug which Verizon user are reporting and ATT is not commenting on it till now. How can I consume over 6GB worth of data over a 3 day period which is more than my total data usage for a year. That is equivalent of streaming hd video (approx 300 MB per hour) for 20 hours.
    CNN link to Iphone 5 data bug story
    http://money.cnn.com/2012/10/01/technology/iphone-​5-data-overage/index.html
    Anyone is having similiar problems?

    There have been lots of discussions about this particular topic
    https://discussions.apple.com/message/19398807#19398807
    https://discussions.apple.com/message/19780554#19780554
    https://discussions.apple.com/message/19802173#19802173
    and the list goes on.
    Apple has zero control over what AT&T does in regards to their plans for data, their charges for data, or anything to do with their service that you pay for every month

  • Windows 8.1 100% Disk Usage Problem

    I am running a Toshiba Satellite C855D-S5110. 12 GB Ram, 456 GB HD with 311 GB free, CPU Max speed 2.7 GH. My computer, as many other
    W8 and W8.1 users seem to suffer, is nearly constantly at 100% disk usage (apparently
    I have seen many claims as to what causes this; some even say it involves a bad HD. However, I do not think my HD is bad because
    1. My HD was fine before I got 8.1, to the best of my knowledge ( was on 8 prior to 8.1)
    2. Most importantly, when my computer isn't in the 100% phases, it seems to work absolutely fine!
    I would like help in figuring out what to do about this problem, as well as why it occurs and why it works the way it does (i.e. seemingly just going away for long periods of time).
    It is extremely difficult to work when my computer is being very slow, and not knowing when it will happen or what makes it stop happening is frustrating.
    I will provide below a list of measures I have taken, edited to include new things tried.
    1. Adding RAM
    2. Increasing pagefile
    3. Running programs to clean up clutter, fix registry problems, free up memory, etc (specifically, Iolo System Mechanic)
    4. Disabling the Windows Search Indexing service
    5. Checking for updates
    6. Running Microsoft Security Scanner (it found nothing)
    7. Disabling Live Tiles (of which I only had one in the first place!)
    8. One person claimed that their problem went away when they ran Skype, of all things. I tried this, though it did not do the trick.
    9. Booting in Safe Mode.
    10. Clean Boot.
    11. My drive is 0% fragmented.
    12. Trying to repair the Windows Image does nothing, as it comes up as being healthy when scanned.
    13. sfc /scannow did not fix the problem either.
    14. Running Microsoft's performance scanner and uploading the .etl file got me a reply blaming Chrome, which is impossible because
    the problem occurs with no programs running. I will try another recording and put it up; the link will be edited in.
    https://skydrive.live.com/redir?resid=DD4BA6A3F312AE94!945&authkey=!APrxfxQeNw14igc&ithint=file%2c.etl

    Having the exact same problem on a computer after the Windows update installed from 8.0 to 8.1. 
    Even after reloading the computer  from scratch.
    The drive activity goes WAY up when booting  - to 100%.  It then seems to calm down but randomly will go up and down throughout the day peaking at 100%. Even when nothing is open except a MSWord page into which  I am typing.
    If other programs are open such as Excel and/or Internet Explorer they will display the file name at the top as usual with (Not Responding) at the end. The screen will fade to an opaque look. This lasts for up to approx. 15 minutes at times and the computer
    responds to no keyboard or mouse clicks. The mouse pointer on the screen still moves but nothing happens when I click on anything.
    I managed to keep the Task Manager visible and it clearly shows less than 20% memory use and less than 5% CPU use when this occurs. But the HDD is at 100%.
    The fact that it was fine prior to updating to 8.1 indicates an issue with 8.1 to me. Absolutely nothing else has changed on this machine - aside from Windows Update.
    This is a know fault and I hate W8.1. Once it finishes whatever it is doing then there are a bunch of screen flashes as it catches up to what ever and where ever I had clicked with the mouse while it was frozen. It is like it is catching up because W8.1
    is causing the HDD to ???????????
    Another issue I encounter is the stupid Automatic Maintenance that cannot be disabled. I have found nothing to accomplish this that actually works no matter what anyone has posted on MS sites. It last rendered my computer today useless for approx. +1
    hour today!!! I had been using the computer and it was never idle for more than 1 or 2 minutes but yet it started. It is set to run at 1:00 am but it was only approx. 5:00 pm.!!
    The Automatic Maintenance is not running however, when the computer freezes and uses 100% HDD as indicated by Task Manager.
    Also I can disconnect the computer from the modem or power off the modem and the HDD remains at 100%! So it is not sending nor receiving anything at that time.

  • IPhone 5 excessive data usage problem (carrier-AT&T)--any resolutions?

    I got an iPhone 5 in June of 2013, and the billing period after I got it, I went over my data usage for the first time ever (I have been an iPhone user since 2010). I thought that it was just because I had been working out at a camp that got poor reception and had been using as much as I always did. However, in the subsequent months, I have racked up data overage charges every month, and since October, it's been several gigs over my plan. I have a 4gb plan with AT&T that I share with my parents (I am a college student), and they don't use hardly any data. As I am a nineteen-year-old, I admit that I do spend a lot of time on the Internet and use a lot of social media (Facebook, Twitter, Instagram, Vine, Snapchat, etc.), and I have always used a lot more data than my parents, but I don't think I'm doing much more than I did when I still had the iPhone 4 and 4s. I haven't gotten a chance to call AT&T yet to see what they have to say about it, and, unfortunately, my school is in the middle of nowhere and my hometown doesn't have an Apple store anywhere near it so I don't think I'll be able to get to a genius bar any time soon, but I've done a little research and found some threads here that mention problems with the iPhone 5 and data usage. Most of these threads seem to be related to Verizon or are from iOS 6 (and my phone is updated to iOS 7.0.4, which is the latest update at this date), and I wondered if it was still a problem for people.
    In the past few minutes, I have done the following to the phone:
    Turned off Cellular Data
    Turned off iCloud Backup
    Turned off Cellular Data for all unnecessary apps
    Turned off Location Services for all unnecessary apps
    Turned off Notifications for all unnecessary apps
    Changed all email accounts to manual
    Turned off Diagnostics and Usage sending
    Turned off Ad Tracking
    Turned off Documents and Data
    Now, not to sound spoiled, but I think this is both tedious and a pain in the rear end. It seems to me like it's just treating the symptoms rather than the disease itself, so to speak. I feel that for the money we pay for what is essentially a handheld computer with phone capabilities, I should be able to use it as such. When I've turned off Cellular Data in the past to remedy this problem, I notice that I don't receive texts from a lot of people, which is really frustrating, because I feel like I basically just have a glorified iPod. If I had wanted an iPod, I would have bought an iPod. So, basically, has anyone experienced this problem recently/found a solution that actually fixes the problem rather than just masking it? I feel bad about the overage charges and am very annoyed with the fact that my old iPhone seemed to work better than this new one, and that I can't seem to find much evidence of either Apple or AT&T making much of an effort to acknowledge or fix this expensive problem. My phone reports that my cellular data usage for the current period (which ends on February 11, and it is currently January 28) is 21 GB, and I find it very hard to believe this to be true.
    I'm about to reset my phone and see if that does anything, but I would really appreciate it if someone could help me out here.
    Thanks.

    I'm not trying to minimize your issues, but I have an iPhone 5S and find that I have not had these types of problems on AT&T. I'm wonding if something has gotten stuck in a loop that is continually trying to use data. If you make a good backup of your phone, try restoring it as new, and do not add anything to the phone right away. Let the device run like this for a little while and see what kind of usage you have. You report you phone is showing usage of 21GB. Did you rese this setting on the phone to begin at your billing period? The reason I ask this is some people believe this setting resets on its own with your billing period, it does not. This has to be manually reset by the user, so it might not be that accurate depending on the last time that you reset it.
    If the phone seems to not use so much extra data during the period the device does not have extra apps on it, then try restoring from your backup and see what happens. If this increases your data usage quite fast again, then there is probably something corrupt in the backup that is causing this issue.

  • Joining/Selection problem...

    I have created this view:
    - First it selects the Lowest and Highest date which should be taken in DATES
    - Then it selects every first of the month between the Lowest and Highest date and stores that in MONTHS
    - Then it selects the ID, FirstOfTheMonth, (intakes UP TO FirstOfTheMonth), (Outgoing UP TO FirstOfTheMonth) from TWO tables without matching any id field...
    Now If I run the view in SQL Developer, it works nicely. If I use the view in Crystal Reports i get an error message saying a subquery returns more than 1 row...
    I have a feeling that my CALCULATIONS table is wrongly setup. The problem is that I need to select the PNM_AUTO_KEY from Parts_master and use this Key in the two subqueries... The way i did that is probably wrong.... My guessing is I should use a OUTER JOIN in stead of the way I did it now...?_
    CREATE OR REPLACE FORCE VIEW "VIEW_STOCK_COUNT" ("PNM_AUTO_KEY", "COUNT_DATE", "QTY_RECEIVED", "QTY_USED", "QTY_BALANCE") AS
    with
    DATES as
    (select (select min(REC_DATE) from STOCK) as FROM_DT, (select max(CHANGE_DATE) from STOCK_ADJUST) as TO_DT from DUAL),
    MONTHS as
    (select add_months(trunc(FROM_DT,'MM'),ROWNUM-1) as DT from DATES connect by ROWNUM <= months_between(TO_DT, FROM_DT)+1),
    CALCULATIONS as
    (select
    PNM.PNM_AUTO_KEY PNM_KEY,
    MONTHS.DT DT,
    NVL((select sum(stm.qty_rec) from stock stm WHERE STM.REC_DATE < MONTHS.DT AND STM.PNM_AUTO_KEY = PNM.PNM_AUTO_KEY GROUP BY pnm_auto_key),0) INCOMING,
    NVL((select sum(saj.qty_adj) from stock_adjust saj
    inner join stock stm on saj.stm_auto_key = stm.stm_auto_key
    inner join parts_master pnm on stm.pnm_auto_key = pnm.pnm_auto_key where SAJ.CHANGE_DATE < MONTHS.DT AND STM.PNM_AUTO_KEY = PNM.PNM_AUTO_KEY group by pnm_auto_key),0) OUTGOING
    from MONTHS, PARTS_MASTER PNM)
    SELECT
    CALCULATIONS.PNM_KEY PNM_AUTO_KEY, CALCULATIONS.DT COUNT_DATE,CALCULATIONS.INCOMING QTY_RECEIVED, CALCULATIONS.OUTGOING QTY_USED, (CALCULATIONS.INCOMING + CALCULATIONS.OUTGOING) QTY_BALANCE
    FROM
    CALCULATIONS;

    Hi,
    user574699 wrote:
    I have created this view:
    - First it selects the Lowest and Highest date which should be taken in DATES
    - Then it selects every first of the month between the Lowest and Highest date and stores that in MONTHS
    - Then it selects the ID, FirstOfTheMonth, (intakes UP TO FirstOfTheMonth), (Outgoing UP TO FirstOfTheMonth) from TWO tables without matching any id field...
    Now If I run the view in SQL Developer, it works nicely. If I use the view in Crystal Reports i get an error message saying a subquery returns more than 1 row...
    Sorry, I don't know anything about Crystal Reports. I would expect the view to be handled entirely by the database. What is the query that you're running when you get the error?
    Will Crystal Reports run a very simple query on this view?
    I have a feeling that my CALCULATIONS table is wrongly setup. The problem is that I need to select the PNM_AUTO_KEY from Parts_master and use this Key in the two subqueries... The way i did that is probably wrong.... My guessing is I should use a OUTER JOIN in stead of the way I did it now...?_That's easy to test. Replace the scalar sub-queries with literals, and see if Crystal Reports will run it.
    If not, that's not the problem.
    If you do decide to re-write the calculations sub-query, and you need help, post some sample data and what calculations should contain given that data.
    Could the WITH-clause be causing the problem? (Again, it's hard to see why the front-end tool would care how the view was defined.)
    It looks like you could use in-line views instead of WITH, if necessary.
    CREATE OR REPLACE FORCE VIEW "VIEW_STOCK_COUNT" ("PNM_AUTO_KEY", "COUNT_DATE", "QTY_RECEIVED", "QTY_USED", "QTY_BALANCE") AS
    with
    DATES as
    (select (select min(REC_DATE) from STOCK) as FROM_DT, (select max(CHANGE_DATE) from STOCK_ADJUST) as TO_DT from DUAL),
    MONTHS as
    (select add_months(trunc(FROM_DT,'MM'),ROWNUM-1) as DT from DATES connect by ROWNUM <= months_between(TO_DT, FROM_DT)+1),
    CALCULATIONS as
    (select
    PNM.PNM_AUTO_KEY PNM_KEY,
    MONTHS.DT DT,
    NVL((select sum(stm.qty_rec) from stock stm WHERE STM.REC_DATE < MONTHS.DT AND STM.PNM_AUTO_KEY = PNM.PNM_AUTO_KEY GROUP BY pnm_auto_key),0) INCOMING,
    NVL((select sum(saj.qty_adj) from stock_adjust saj
    inner join stock stm on saj.stm_auto_key = stm.stm_auto_key
    inner join parts_master pnm on stm.pnm_auto_key = pnm.pnm_auto_key where SAJ.CHANGE_DATE < MONTHS.DT AND STM.PNM_AUTO_KEY = PNM.PNM_AUTO_KEY group by pnm_auto_key),0) OUTGOING
    from MONTHS, PARTS_MASTER PNM)
    SELECT
    CALCULATIONS.PNM_KEY PNM_AUTO_KEY, CALCULATIONS.DT COUNT_DATE,CALCULATIONS.INCOMING QTY_RECEIVED, CALCULATIONS.OUTGOING QTY_USED, (CALCULATIONS.INCOMING + CALCULATIONS.OUTGOING) QTY_BALANCE
    FROM
    CALCULATIONS;Don't post unformatted code

  • Serious CPU usage problem

    Hi everyone,
    I used to have my own kernel running and everything was fine.
    Recently, after the cool changes which happend with kernel/udev related stuff in the last months and weeks, and with the "beyond" kernel being available and having the possibility to use software suspend2 an easy way,  I thought it would perhaps be better to switch to the beyond kernel package, staying up to date easily and not having to care about wether some update perhaps wouldn't work with my old kernel anymore...
    After some minor hassle, I got it working fine and thought, well, runs reasonably well. But then I discovered some strange issues:
    * If I boot with the regular kernel, log in to the console, use mplayer to play an mp3/ogg file, I got 22% cpu usage by mplayer, and additional system cpu usage, summing up to only 66% of my cpu is in idle state!
    * If I do the same thing with the beyond kernel, it is still around 7 to 8 %, the CPU has a maximum of 87% idle time
    * If I start up X and start xmms, without playing anything, even with stock configuration and nothing changed/enabled, xmms will take 12% of my CPU!
    * If I run some other things aside (like mplayer), xmms - still being idle! - still uses 4% CPU
    * if I actually use xmms, it takes up to 20% cpu
    * now mplayer only uses 2% CPU - but still too much for only playing a music file
    So I just don't have anything left than scratching my head. What's going on there?
    Ford Prefect

    XMMS doesn't play nice with today's Linux scheduler.  It's old.  (I still use XMMS -- out of sheer habit -- and ignore the problem.)   

  • HELP: iPhoto 6.0.6 memory usage problem, iMac getting *slow*

    Hi,
    I have a 20" iMac with 2 Gig RAM.
    I have iPhoto 6.0.6 with lots and lots of pictures and little movies (taken with an old digital camera) -- a "get info" on the "iPhoto Library / Originals" folder says there are 9836 items in there.
    When I open iPhoto, the Activity Monitor indicates iPhoto is using 130meg real memory, 130meg virtual memory. With every "page down" in iPhoto (the thumbnails are running about 6 items across) about 50 meg of memory gets added to real memory, and even more gets added to virtual memory.
    After just a few minutes of usage it now looks like this:
    Real Memory: 382.43 MB
    Virtual Memory: 1.18 GB
    Eventually the computer gets extremely slow and unresponsive; I've seen the iPhoto memory usage as high as:
    Real Memory: 1+ GB
    Virtual Memory: 2+ GB
    Does anyone have any suggestions for how I can fix this problem?

    I have to say that the Virtual Memory numbers compare quite okay with both my Macs here, the Actual Seems slightly higher but noting spectacular. That said, the highest you’ve seen do see quite extraordinary.
    Something to try:
    Create a new account (systempreferences -> accounts) and make a library there. Import some pics and see if the problem is repeated there.
    Regards
    TD

  • OBIEE: non empty cross join function problem with some reports

    Hi all,
    I am getting some problem ,when we are excuting some requests in OBIEE its taking long time , Actually our OBIEE is connected with Essbase when we are generating some reports its taking long time so i captured the Query in OBIEE and Iam excuting that query in Essbase MDX editor
    its having the the function " NON EMPTy CROSS JOIN"
    which reports having non empty crossjoin function its taking long time so how can i disable this function in OBIEEfor that reports
    I dont want to use that function for my reports so how can i do this in OBIEE
    your help would be appriciated.
    Thanks
    Edited by: user8815661 on 26 mai 2010 08:44

    Any Help

  • Join Configuration Problem

    Hello,
    When I am selecting fields from different table for a perticular
    Business area.. I get the follow ing probelm.
    "Join Configuration Cannot be resolved. Reason: more than 1
    detail detail folders uses non-aggregated items"
    I am not sure what this message means.
    If anyone can be of assistance as too what the problem might be.
    Thanks
    Pankti

    hello fren,
    I had the same problem and solution for this problem is as :
    u will have to select all the items from ur selection list again.mean put ur selected list as empty and choose again.u r prob will resolve.
    it happens bcoz there is no. of columns which are agg. or detailed and when we use columns which are joined through folder ,we need to take all as either detail or sum .
    contact me for further assistance
    sumit
    oneapps tech pvt ltd
    banglore
    e-id [email protected]
    Message was edited by:
    user474011
    Message was edited by:
    user474011

  • [XFCE4] ram usage problem

    when i using xubuntu with xfce ram usage was ~120-160 with only pidgin and xchat
    but on arch with xfce ram using just on start up ~160 and it with out any apps..
    what the problem?

    2b9anders
    im using htop
    im install xubuntu to comare them.xubuntu show me ~220mb ram WTF???
    and I compare htop logs of them
    in xubuntu:
    panel plugins(like language layouts,cpu load...) using about 10mb each.
    X using about ~80-100mb
    in arch:
    p.p. using about 20mb each
    X using about 40-60mb of ram.
    when i will be at home i'll paste screens of htop on xubuntu and arch
    P.S. sry for my english ^^

  • Joining/hosting problems with two particular people

    I have a skype issue with just this one particular person, where if I or the particular person try to host a group call, the other person can't join and experience no sound, then get kicked out of the call. Rejoining didn't work, uninstalling didn't work, and different computers didn't solve the issue. Group calls work fine when other people host.

    I am also having this problem. I would host and my friend would not be able to connect, same goes vis-versa. We both have stable internet and it gets annoying when we are the only two in call and have to resort to team speak as our calling programm and its not enjoyable. I hope the admins respond to this to clarify what is going on.

Maybe you are looking for