Having clause does not work
Hi
I do following on one of our clients dbs:
select s.member_no,s.room_nights
from stay_records s, memberships m
where s.member_no is not null
and s.member_no=m.membership_card_no
group by s.member_no,s.room_nights
having sum(s.room_nights) >= '2'
I basically want to find all members that have stayed two or more nights, the problem is that the query returns lots of one nighters as well. Have I made a mistake in my query?
I'm absolutely sure that the link between the tables are correct.
Apreciate your help.
/Robert
select s.member_no,sum(s.room_nights) room_nights
from stay_records s, memberships m
where s.member_no is not null
and s.member_no=m.membership_card_no
group by s.member_no
having sum(s.room_nights) >= 2ie. don't group by room_nights, and don't surround the 2 with single-quotes.
Similar Messages
-
I have an iPad 2 and so does my mom. We both have the app Slotomania and now all of sudden after having it for months, our games connected and we don't know how to fix it. Deleting it and reinstalling does not work.
Does the app now use iCloud, do you use iCloud and do the two of you use the same account on iCloud?
Just a guess. -
hi! I am having a problem with my dictation. It works fine with Greek but it does not work at all with English. Anyone knows why?
Have you changed the system voice to an English one in system preferences?
-
I'm having a lot of problems with the hotmail account, regularly is indicating an error in the server, that I have to introduce the password again that late that this is wrong. I have changed the password making this shorter but it does not work.
bump? Is bumping allowed? Lol.
I just really need some help here. -
I am having trouble with my iPad, i can start it, but the iPad does not work. i tried to use the power and home button at the same time, the apple logo appears, but the iPad does not work. What am I suppose to do?
After the Apple logo appears, what happens then? Can you hear any sounds or if you tap on the screen, does it seem like apps can open or are you just seeing a black screen? You might have a hardware problem, but you can try restoring the software and see what happens.
Read this in its entirety before you do anything. Make sure you read the sections at the end about using recovery mode.
iTunes: Restoring iOS software - Support - Apple -
Trusteer add-on does not work having upgraded to Firefox 7.0
Having upgraded to Firefox 7.0 today, the Trusteer Rapport does not work anymore. Thanks to advise.
Hello, The fix was sent yesterday morning by Trusteer. Hereunder is the link
Hello,
Thank you for contacting Trusteer Technical Support.
We are glad to inform you that a version of Rapport which supports Firefox 7 has
been released and is now available for download in the following link:
http://www.trusteer.com/book/rapport-installation-links -
Having installed lion i find the built in web cam does not work
After having installed lion i find the built in web cam (on my mac book pro) does not work, it maybe it just does not work anymore and it is a coincedence that i was changing the OS at the time . Are there any issues with this? i have looked at the discussions but no one seems to have this problem.
After having installed lion i find the built in web cam (on my mac book pro) does not work, it maybe it just does not work anymore and it is a coincedence that i was changing the OS at the time . Are there any issues with this? i have looked at the discussions but no one seems to have this problem.
-
i am having major issues! this does not work i dont understand..does the ipod have to be off while pressing the buttons if so how is it possible if it is connected to the computer either way it turns on..and when i tried these steps while the ipod was on it still doesnt work it just asks me “slide to power off” please someone help me i just cant seem to put my ipod in DFU mode
To get the iPod in recovery mode and DFU mode you first have to turn the iPod off.
Just what is the problem you are tying to resolve?
Sometimes you have to let the battery fully drain if you can't turn the iPod off. After charging for at least hour try again. -
the headset does not work after having my iphone ios 8.0.2 updated to me is very annoying to have to be answering speakerphone is not private and can not go with the hands-free all the time
I had the same issue until I updated my apps through iTunes. I had over 100 updates, but none of them showed on my iPod. After they updated everything started syncing like it is supposed. Go to the apps library and check for updates. After everything syncs leave your iPhone/ipod/ipad connected if the spinning arrows at the top is still spinning. It means that things are still being added. If you go to settings > general > about, you will see it loading songs, videos, photos, etc. If you back out of "about" and then go back to it you will see the numbers for each one change.
-
Membership rules does not work with UDF column name having the max length
Found a bug in OIM .
Membership rules does not work with UDF column name having the maximum length
Steps to Reproduce
1.Create a UDF having max column name length for eg UDF_USR_PERSONAL_SUB_DOMAIN_CO (lable = Personal Code)
2. Create a simple Rule like Personal Code = 7000
3. Assign this Rule as a member ship rule of a Group.
4. Create a user with Personal Code = 7000.
5. User doesnot get the group membership.
Thanks
SurenYes , i verified logs as well .
If you just decrease the column name length , w/o making change to any other attributes , it starts working ..
Thanks
Suren -
i've noticed a touch ID only works with my iPhone six is not plugged into the wall was soon as I plug it in it doesn't work anymore doesn't even register fingerprint.
Charger60 wrote:
i
Touch ID in my iPhone six does not work when it's plugged into the wall is anybody else having this problem?
No. You are the only one. The way I know is that I don't have the problem, therefore no one else can have it.
Seriously, no matter what problem you have, with a half billion iPhones in use, someone else will have the same or similar problem. So knowing that doesn't help solve it in the slightest. As it's new and still in warranty I would take it to an Apple store. Make a genius bar appointment first so you won't have a long wait. -
I recently changed from a pc to a mac book. The major issue I am having right now is getting yahoo to work properly. The major thing is autocomplete does not work and I do not know how to load my contacts to "mail". Furthermore, I cannot attach any type of documents to my emails (Yahoo says there is a problem). I suspect there is a setting somewhere, but I don't know where. Javascript is enabled, so I am out of options
Which os are you using?
Yahoo issues should be posted in their forums or contact Yahoo tech support. -
My Hot Spot does not work after update to 6.0.1. Any suggestions?
Ok, I had the same issue, my phone is unlocked(iphone 5 with 6.1.3). So I went to the apple store and had it replaced. it worked good for a day and started doing the same thing. When the apple tech replaced my phone, he transfered my screen protector to the new one.
so I thought it was my sim card, I put in my sisters sim card from a different carrier and it did the same, so then I was like let me take off the screen protector, and that was it.
so guys, if you have a screen protector on your phone and it's doing "low signal", "No Service", "Searching", "Full bars cycle" then take off the screen protector. so far my phone is working normal. -
I'd like to stop the automatic downloads number one.
I'd also like a possible explanation as to why the new version will not work. I know that Microsoft downloaded a bunch of changes (12) that also seemed to screw up my computer. I have switched off their automatic downloads.To stop Auto updates use: '''Tools -> Options -> Advanced -> Update Tab ''' <br> select the options you require ( see [[Updating Firefox]] )
As for why your version does not work I do not know but suggest you look at:
* [[Safe Mode]] Note when using safe mode do not make changes on the first dialogue Window you see; click the Continue button
* [[Basic Troubleshooting]]
You may also need to review the versions of Java see
* [[Using the Java plugin with Firefox]]
* "Why do I need Java 6 Update 10 and above for Firefox 3.6 and later versions? " - http://www.java.com/en/download/faq/firefox_newplugin.xml
Your System details show you as using version 3.6.12 of Firefox, that is not the latest version, it would be normal practice to update to the latest version, which is why you are being offered the updates. See also [[Software Update Failed]] -
Having start up problems, keyboard light and loudness adjustment via keyboard does not work
Often if I start my MacBookPro 13" with Lion it starts up and is than blocked. I can not open the finder nor starting any programm. The turning wheel never stops and I have to restart the book by pressing the on/off button for a long time. Sometimes I need to do that several times till it runs stable.
During this week I experienced in addition that the keyboard light is not working anymore and also the loudspeaker adjustment does not work via keybaord. Only via menu bar.
Any idea what's going on with my book?Read these two links from the Apple support files:
http://support.apple.com/kb/HT3964
http://support.apple.com/kb/HT1379
Good luck.
Ciao.
Maybe you are looking for
-
Path and File name of the attachment
Hello Srm Guys, Where should be the Path and File name of the attachment are stored for a shopping card Item. Thanks Ram
-
MM02: Updating characterstics in PO text and Material description
Hello Experts, I have a requirement wherein, I have to update the characterstics of a material to the Po text and Material description as soon as they are changed in MM02. At present there is a custom program doing the same,but I need to automate it,
-
Tab Order of POPUPKEY_FROM_LOV doesn't seem to work?
Hi All, If got a POPUPKEY_FROM_LOV in my PL/SQL Dynamic code as follows: APEX_ITEM.POPUPKEY_FROM_LOV(33,lClient,'CLIENTS',60,100,0,'YES', 500,'tabindex="30" ') but it does not recognize the item in the tab order. Can I do it and if so what am I doing
-
Every month for the last 5 months, I have been trying to cancel $13.99 per month on my visa for a subscription that I DON'T HAVE. I WANT THESE PAYMENTS TO STOP BECAUSE I DO NOT HAVE A SUBSCRIPTION ANY LONGER. IT ENDED LAST OCTOBER 2011 AND THE PAYM
-
Hello All, I need some help on analyzing the transports. The situation here is that we have say about 500 transports that were imported into test system and took about 24 hrs. Now we want to import those transports into another system but to improve