How to use parathesis for OR and AND OPERATOR...

oracle 10g
Hi
Guys please help how to use parathesis for this below query its giving same output values for all my similar queries
select count(balance) from balanace_tb
where kk_code in(111,112,113)
or
kk_code in(111,1124,115,116) and sec_id in(50,51,52,53)
or
kk_code in(100,164,215,161) and sec_id in(53,51,52,59)
or
kk_code not in(100,164,215,162,134) and sec_id in(53,51,52,59)
or
kk_code in(100,164,215,16) and sec_id in(53,51,52,59)
and
open_date=20130331

I assume you're looking for something like this?
select count(balance) from balanace_tb
where (   kk_code in(111,112,113)
       or (kk_code in(111,1124,115,116) and sec_id in(50,51,52,53))
       or (kk_code in(100,164,215,161) and sec_id in(53,51,52,59))
       or (kk_code not in(100,164,215,162,134) and sec_id in(53,51,52,59))
       or (kk_code in(100,164,215,16) and sec_id in(53,51,52,59))
and open_date=20130331
If not, please post some example data, the expected output from that data, and the logic you are expecting to use, as well as posting your database version.
Re: 2. How do I ask a question on the forums?

Similar Messages

  • AppleScript how to use "get" for field information and drop-down boxes?

    Hi all,
    First post.
    Looking to use the "get" function or similar for getting information in a list or from a drop-down box or a field.
    Example, you open keychain, open the info. for a cert and want to read the currently selected trust setting for "When using this certificate" drop-down.
    Or, you want to check the Common Name field under details.
    How would I return these specific values?
    Thank you,
    -b

    The exact question being asked here: http://forum.soft32.com/mac/select-table-row-ftopict101735.html
    But, that doesn't work with the latest AppleScript.

  • How to use AX1 for wireless audio and Time Capsule simultaneously?

    I am trying AirFoil to Stream Pandora (Safari) to an amplifier and speakers in the next room connected to an older Airport Express.
    I can play iTunes 11.0.1 (on a MacMini 2.26 GHz running 10.6.8) to this older Airport Express 802.11g (before N came out  - Is this called AX1st?) with the audio out the Express connected to my amplifier and speakers and wirelessly play my music. To do this I have to choose the Airport Express as my network device which means I loose my Time Capsule, which is the device with my internet connection.
    Can you tell me how to stay on the internet with Time Capsule and stream to this Airport Express?
    If I try to extend to this Airport Express I get an error message: "The Network You Selected cannot be extended." (I don't know if that is a "g" "n" thing or what?)
    Do I need a newer Airport Express, or a Netgear or how to get Pandora to an amplifier in a different room, wirelessly?  Then the question will be, how to do this to three different amplifiers in three different rooms.

    How do I
    Make your Express 'join' your Time Capsule's WiFi network in AirPort Utility. This will work wirelessly however your Express will not function as an extender in this mode.
    I'm Using Airport Utiity 5.6.1
    In AU in "Aiport / WIreless tab" I hoped it would be as simple as the word 'Join' showing in the Wireless Mode drop down. But it does not.

  • I have a 1TB external hard drive (NTFS) that has all my files from my old PC, how do I create a partition on it for HFS  without formatting it so that I can use it for Time Machine and the like?

    I have a 1TB external hard drive (NTFS) that has all my files from my old PC, how do I create a partition on it for HFS  without formatting it so that I can use it for Time Machine and the like?

    There aren't any 3rd party apps or anything. I use PC's and Mac's at school and the only computer connected to a printer at my house is a PC so i need access to both

  • How to use an external hard drive and copy files to the disk for mac and windows??

    please tell me how to copy files to external hard disk and use it for both mac and windows. there is the fat32 formatting bt i dont wanna use formatting because i already have a lot of content on the exteral hard disk. thank you.

    It is simplest to have the HDD formatted to noe common to both Mac an PC.  ExFAT is one.  But to do that will erase all data on the HDD.
    If the HDD id formatted NTFS, Mac can read but not write to it.  The solution then is to use a third party application such as Paragon or Tuxera which will overcome that obstacle.  These applications do have mixed reviews.
    Ciao.

  • How to create documentation for report programs and how to use it

    how to create documentation for report programs and how to use it in the selection screen by placing an icon in the Applicatin Tool bar. If i click this icon the help documentation has to display.
      Note: Exaple <b>RSTXSCRP</b> programs selection screen

    Hi
    1 goto SE38 transaction, give the program name
    2 Click on documentation radiobutton & then press change
    3 Write your PURPOSE, PREREQUISITES etc details
    4 Save the same & Activae it.
    The icon will come automatically on selection screen
    Thanks
    Sandeep
    Reward if useful

  • I use Plaxo for my contacts, and I want it to synch my Outlook contacts with my PC.  So I can't use my iCloud contact synch.  My question: How do I disable my iCloud contact synch feature while still allowing the rest of iCloud (music

    I use Plaxo for my contacts, and I want it to synch my Outlook contacts with my PC.  I got a new HP PC with the (awful) Windows 8.0 operating system, and, to say the least, I miss the good old days.   Plaxo customer support tells me that I can't use my iCloud contact synch because they clash. 
    My question: How do I disable my iCloud contact synch feature while still allowing the rest of iCloud (music, photos) to operate as usual.
    What mysterious steps must I take in order to do this and not cause a complete meltdown in the process?  The meltdown that I fear most is the one that happens between my ears.

    Music is nothing to do with iCloud but Photostream is, so turn off Mail, Contacts and Calendars (in the iCloud Control Panel) and leave everything else on.
    You will lose iCloud Calendars and Mail as well as Contacts, but you can manually re-enable mail (if you use iCloud email)

  • I've used iMessage for abit now and latly my step dad has got an ipad that is now joint to the same computer and on his ipad is my number and the email for imessage and i want to no how to get it of fully and not just untick it?

    I've used iMessage for abit now and latly my step dad has got an ipad that is now joint to the same computer and on his ipad is my number and the email for imessage and i want to no how to get it of fully and not just untick it?

    Hi barryfromwarrington,
    Welcome to the Support Communities!  There are two things I can think of to keep your Stepdad's information separate from yours on the computer and the iPad.   On the computer, he should have his own administrative account, and on the iPad he needs his own Apple ID for iTunes and iCloud services.  Here is some basic information to get started.  I don't know if you have a Mac or Windows computer, so I'll include info for both.)
    OS X Yosemite: Set up users on your Mac
    http://support.apple.com/kb/PH18891
    OS X Yosemite: Set up users on your Mac
    If your Mac has multiple users, you should set up an account for each person so he or she can personalize settings and options without affecting other users. 
    Add a user
    Choose Apple menu > System Preferences, then click Users & Groups.
    Click the lock icon  to unlock it, then enter an administrator name and password. 
    Click Add  below the list of users. 
    Click the New Account pop-up menu, then choose a type of user.
    administrator: An administrator can add and manage other users, install apps, and change settings. 
    Enter a full name for the new user. An account name is generated automatically. To use a different account name, enter it now—you can’t change it later. 
    Enter a password for the user, then enter it again to verify. Using a password hint is recommended to help the user remember his or her password. 
    Click Create User.
    For an administrator, select “Allow user to administer this computer.”
    Last Modified: Nov 18, 2014
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues - Apple Support
    http://support.apple.com/en-us/HT203206
    Follow the steps below to create a new user account in Windows Vista or Windows 7:
    Choose Start > Control Panel.
    Open "Add or remove user accounts." (If you're using the Classic view in Windows Vista, open "User Accounts," and then open "Manage another account.")
    Select "Create a new account" and follow the instructions to set up the account.
    Once you create the new account, choose Start > Log Off.
    Log in to the new user account.
    Open iTunes and see if the issue you're experiencing persists in this new user account.
    Frequently asked questions about Apple ID - Apple Support
    http://support.apple.com/en-us/HT204161
    iCloud: Set up iCloud
    http://support.apple.com/kb/PH2609
    Cheers,
    - Judy

  • How to use ssd as boot drive and hdd as storage on a macbook pro 13

    Does anyone know how to use SSD as boot drive and have HDD in optical bay as storage on a Macbook pro 13. I mean in that both drives work as one . by formatting using mac software . I would like to run all programs and OS but would love to have my downloads and useless data on run on my 1tb 5400rpm hdd without me have to manual send it there..

    Does anyone know how to use SSD as boot drive and have HDD in optical bay as storage on a Macbook pro 13. I mean in that both drives work as one
    Each drive mounts as a separate volume. There is no convenient way to make them look like one contiguous volume.*
    Franky, with an hdd and a ssd I would recommend you put your home dir on the hdd and leave the ssd for the OS and your key applications.  It's relatively easy to do and I think better than moving only portions of your stuff.
    How to Move the Home Folder in OS X – and Why
    * There are ways to to make musltiple volumes appear as one large drive but I think it is beyond the scope of this discussion and not appropriate to this configuration.

  • How to populate data for 2LIS_40_REVAL, 2LIS_43_POSCAS and 2LIS_44_POSREC

    Hi
    How to populate data for 2LIS_40_REVAL, 2LIS_43_POSCAS and 2LIS_44_POSREC datasources at RSA3?
    I'm very new to retail BI.
    I think there is no setup tables for Retail infosources.
    Any IDoc or BAPI activation is required or other procedure?
    We are in BI-700 SAPKW70015 support pack R/3 side
    and SAP_BW 700 Support pack SAPKW70016 &
    BI_CONT 703 Support pack SAPKIBIIP9 BI side
    Can anyone guide me how to load data?
    Points assured
    Thanks in advance
    Ramana P

    Dear Ramana,
    There is no setup table for POSCAS and POSREC.This has to be popuated with a BADI Implementation. 
    As of PlugIns 2002_1_470 and 2002_2_470, POS data is update into BW the 2LIS_44_POSREC and 2LIS_43_POSCAS extractors using a BADI. To be able to update data into BW, the relevant implementation for the BADI must be activated in each case. You can activate the implementation in transaction SE19. The implementations are as follows:
    POS_EX_REC_PI2003_1 for extractor 2LIS_44_POSREC
    POS_EX_CAS_PI2003_1 for extractor 2LIS_44_POSCAS
    Once the activation of BADI , create the back ground jobs for the 44 application and the data is pushed into Delta queue and it can be loaded into BI .
    Hope this helps you.
    Thanks,
    Krishna Charan

  • How to use stored procedures in DIAdem and Can the stored procedures be used to return values?

    Can anyone please tell me how to use stored procedures in diadem and to return values from it. Its really important, can you please answer it at the earliest.
    Thanks In advance
    spiya

    Hi Spria,
    I'm very sorry for the mix-up, I thought Allen was going to answer you back with the particulars that we found out. Check out the attached Word document and the below tidbits:
    The built-in DIAdem ODBC functions {SQL_...()} can only call stored functions, which return a scaler result {found then in SQL_Result(1,1)}. The syntax for this with an ORACLE db is
    "select function(parameters) from package"
    ...where package defaults to "dual" if you don't use your own package.
    There might be exceptions to that though, and the syntax will be different for other databases. Note that stored ORACLE procedures can NOT be called from the ODBC functions, instead you must use either ADO function calls in the DIA
    dem VBScript or the OO4O COM wrapper that ORACLE provides (this is described in further detail in the below Word document).
    Hope this helps,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Calling_ORACLE_Stored_Procedures_from_DIAdem.doc ‏28 KB

  • I have used lightroom for ~2 years and have lightroom 5.5 installed on a PC. Yesterday evening I uploaded a new set of photos which I cataloged and rated as usual. After that when I switched to the develop module trouble began. First thing was when using

    I have used lightroom for ~2 years and have lightroom 5.5 installed on a PC. Yesterday evening I uploaded a new set of photos which I cataloged and rated as usual. After that when I switched to the develop module trouble began. First thing was when using the crop tool the picture would disappear and only reappear once I closed the tool. Then exposure and White balance changes would change the histogram but not the appearance of the photo. Finally clipping was also not appearing on the picture. I first reuploaded the photos. No effect. Then I reinstalled lightroom. No effect. Help please!

    Try deleting your preferences file
    How do I delete the Lightroom Preferences file? - The Lightroom Queen Help Desk & Members Area - Powered by Kayako Resol…

  • My iPod has not been working for a month now and i was hoping that you could help me.The part where you charge and sync the iPod is not connecting.There is defiantly not the lead as we use it for the iPhone and that works please could you help!

    my iPod has not been working for a month now and i was hoping that you could help me.The part where you charge and sync the iPod is not connecting.There is defiantly not the lead as we use it for the iPhone and that works please could you help!
    yours sincerly
    jackfromsurrey

    What I am saying is ..........
    The iPhone HAS to be active making calls on the UK carrier network for the carrier to identify as "theirs" and therefore eligible for the Carrier to unlock
    The way to achieve this is to use a PAYG sim making and receiving calls to establish a customer relationship  with the Carrier and then follow the Carrier's process to unlock
    With a PAYG it usually means adding a specified (by the carrier ) amount  usually £15 /£20 depending on the carrier
    This is how O2 function and according to Gemma  this is how Vodafone work

  • Hi, I've been using the 3D function in PS, upgraded to CC2104 and it was disabled (need more VRAM). I then reinstalled CS6 and was able to use it for a day and now, today, I am getting the same message I got with PS CC2014 saying my VRAM is too low again.

    Hi, I've been using the 3D function in PS, upgraded to CC2104 and it was disabled (need more VRAM). I then reinstalled CS6 and was able to use it for a day and now, today, I am getting the same message I got with PS CC2014 saying my VRAM is too low again. I'm in the middle of a project that needs to go live tomorrow. HELP!!! Please.

    Photoshop requires 512 Meg of VRAM or more to use the 3D features - that's been the same for version 14 (CC) and now 15 (CC 2014). Check Help->System Info to see how much your card says it has.

  • How to use Opendoc to link parent and child

    I have parent and child reports, I want to link them. When I click parent id then it should display child report.
    How to use Opendoc for this?
    Thanks,
    Charita

    You can use openDoc selection variable method for link the reports.
    Refer this link
    http://book.soundonair.ru/sams/ch31lev1sec2.html#PLID2

Maybe you are looking for

  • Electronic wallet

    Hello, is there any electronic wallet application for N95 available? I need it for storing PIN codes etc. Thanks.

  • When I open a new tab in Firefox (v. 5) the custom background I have selected doesn't show. Any thoughts? Thanks

    When I open Firefox for the first time, the custom background I have displays. But any time I open a new tab while FF is already running the background displays as white- not showing the custom picture I have selected

  • How to cancel pre orders in i books?

    I relize by chance today that I have pre ordered ( how and when?) some books. I want to cancel these pre orders but I can't find how to proceed.... Thanks a lot for any help you can bring me!

  • Camera won't work in skype

    Upgraded to Lion and now Skype won't recognise the imac camera. "Built in isight" is listed in the video prefrences but the test screen is blank. The Skype calls show a video icon with a cross through it and when I click it it blinks, then stays cros

  • Naming conflict

    Hello, I recently purchased a new canon camera with raw formats, so I have ordered aperture to work with. Now I already had a canon camera and thus some 3000 pictures with the filenames img_0001, etc and the new camera uses the same naming system. Co