List of dept where all employees have same age

Hello Guys ,
I have a emp table and a city table  , wherein I have details related to employees   and cities .
I want those dept where in all employees belongs to a particular city .
Thanks in advance

Hi,
96097f0e-f165-463a-a0a2-3d15214c8a3d wrote:
Hello Guys ,
I have a emp table and a city table  , wherein I have details related to employees   and cities .
I want those dept where in all employees belongs to a particular city .
Thanks in advance
The title you chose for this thread is
List of dept where all employees have same age
but I don't see anything about age in the description of the problem.  This is one example why you need to post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data, as detailed in the forum FAQ: https://forums.oracle.com/message/9362002
As mentioned before, post your best attempt at a solution.
Did you mix up 2 separate problems from the same homework assignment?  If so, solve the problem about the particular city first; it's a little simpler.

Similar Messages

  • All users have same bookmarks

    Updated to Mavericks.  Now all users have same bookmark set and changes by one user changes bookmarks in the other accounts.
    Any ideas?
    Thanks,
    David

    All the users are synchronizing Safari with the same iCloud account. That's what you have to change.

  • Why contacts birthdays are being showed in iCloud calendar all with the same age (11 years)??

    Why contacts birthdays are being showed in iCloud calender all with the same age (11 years) ?? There is a solution to solve this problem ??
    Thank-you

    I cannot agree more with your comments! What a way to frustrate your customers!
    I have been having an issue with iCloud on Mac where it kept asking me for my password and sometimes would, sometimes would not continue to access my iCloud mail. Today it just refused to connect to iCloud mail.
    I looked in the Mail, Contacts and Calendars in my MacBook Pro settings and discovered that 2 iCloud accounts were present. One with my original Apple ID (a gmail address) and a second with my new iCloud email ( an @me.com address). Having deleted the second account, using the new @me.com address everything is working fine.
    So from my viewpoint when I moved over to iCloud I was asked to sign in with my Apple ID (the gmail address) then to create an @me.com address. However, as far as I can see all sign ins to the new @me.com account on Macbook, iPhone and iPad need to be done through the old Apple ID (the gmail address). Is that confusing and just plain crazy???
    Further, after creating the new @me.com address I soon found out that this is apparently now forever bound to my old Apple ID and cannot be changed. I mean why can't I delete the iCloud account and start anew with a different @me.com address??? Also, as everybody using iCloud must create an @me.com address why on earth can I not get rid of my old gmail address and have my entire Apple ID accessed through the new @me.com address? Creating a whole new Apple ID will not solve this as we are unable to transfer purchases between accounts.
    Apple products are great IMHO, but they do seem to not think things through in a very big way sometimes......

  • Deleting from multiple tables where few tables have same column name

    Hi,
    I am new to PL/SQL and need some help. I need to delete data older then X years from some 35 odd tables in my schema and out of those tables 25 tables have same column name on which i can have my "where" clause and rest 10 table have different table names. I am doing something like this :
    declare
    table_list UTL_FILE.FILE_TYPE;
    string_line VARCHAR2(1000);
    tables_count number:=0;
    table_name VARCHAR2(400);
    column_name VARCHAR2(400);
    BEGIN
    table_list := UTL_FILE.FOPEN('ORALOAD','test7.txt','R');
    DBMS_OUTPUT.PUT_LINE(table_list);
    LOOP
    UTL_FILE.GET_LINE(table_list,string_line);
    table_name := substr(string_line,1, instr(string_line,'|')-1);
    column_name := substr(string_line, instr(string_line,'|')+1);
    DBMS_OUTPUT.PUT_LINE(table_name);
    DBMS_OUTPUT.PUT_LINE(column_name);
    IF column_name = 'SUBMISSION_TIME' THEN
    delete from :table_name where to_date(:column_name)<(sysdate-(365*7));
    ELSE
    delete from || table_name || where ( || to_date(column_name) || ) <(sysdate-(365*7));
    END IF;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    UTL_FILE.FCLOSE(table_list);
    DBMS_OUTPUT.PUT_LINE('Number of Tables processed is : ' || tables_count);
    UTL_FILE.FCLOSE(table_list);
    END;
    WHERE the text file "text7.txt" contains list of table name and column names separated by a pipe line. But when I execute the above proc it gives error "invalid table name".
    Can something like this be done or is there any other way to execute this task of deletion from 35 tables.
    Thanks.

    Thanks for replies. I don't know what I am doing wrong but still not getting this damn thing work...This is the proc i am running now :
    declare
    table_list UTL_FILE.FILE_TYPE;
    string_line VARCHAR2(1000);
    tables_count number:=0;
    table_name VARCHAR2(4000);
    column_name VARCHAR2(4000);
    code_text VARCHAR2(2000);
    BEGIN
    table_list := UTL_FILE.FOPEN('ORALOAD','test7.txt','R');
    LOOP
    UTL_FILE.GET_LINE(table_list,string_line);
    table_name := substr(string_line,1, instr(string_line,'|')-1);
    column_name := substr(string_line, instr(string_line,'|')+1);
    IF column_name = 'SUBMISSION_TIME' THEN
    DBMS_OUTPUT.PUT_LINE('do nothing');
    ELSE
    code_text:= 'begin delete from'|| (table_name) ||'where to_date' || (column_name) || '<(sysdate-(365*7))';
    Execute Immediate code_text;
    END IF;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    UTL_FILE.FCLOSE(table_list);
    DBMS_OUTPUT.PUT_LINE('Number of Tables processed is : ' || tables_count);
    UTL_FILE.FCLOSE(table_list);
    END;
    But it gives following error :
    " ORA-06550: line 1, column 51:
    PL/SQL: ORA-00933: SQL command not properly ended
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 1, column 68:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
    ORA-06512: at line 22 "

  • Display Simsun Font in JTextPane, need all characters have same width

    Hi, Gurus
    Need help regarding this issue.
    I am using a JTextPane for display and user input, and I need to use "Simsum" font(customer requirment). And an important requirment is that every character should have the same width, including space. And I find out that when displayed in JTextPane, for English characters and digits, there is no problem, they all have same width, only problem is with space, it is a little bit narrower than other characters. For example, if I type 26 characters "ABCD......XYZ" in the first line, then type 26 spaces in the second line, it is very noticeable that the spaces are narrower.
    At first I thought it is the problen with the font, but then I tried type characters and spaces in Notepad using "Simsun" font and find out that space has the same width with other characters.
    I am thinking probably I need to create my own font based on "Simsun" font, or there is some attributes or styles I need to add when create the styled document for my JTextPane.
    Can anybody give me some help here? Thanks

    Another new dude who is clueless as to the possible effects of cross-posting

  • Show Rows Where Two Columns have Same Data

    Hello,
    I have a spreadsheet that I need to sort by showing me all the rows where the data is equal between two columns.
    I.E. I have a column called Last Name and I have another column, U, with some of those Last Names, I want to sort the spreadsheet to show me only the rows that match up with the same Last Name in coumn a and U.
    Thanks for any help.
    L

    To sort the table:
    Add two columns to the table. For this discussion, I'll refer to them as columns AA and AB.
    In AA2, enter: =ROW()
    Fill to the bottom of the table. With all f these cells selected, Copy, then Edit > Paste Values.
    This gives you a column you can sort by to restore the original order of the table.
    In AB2, enter: =IF(A=U,U," ") using option-space between the double quotes.
    Visually, this will repeat the duplicated names once more in column AB.
    An ascending sort on column AB will bring all rows with duplicate data in columns A and U to the top of the table.
    For greater visibility You might also add a conditional format rule to all of column AB, as I've done here for column D:
    The box to the right of "Text doesn't contain" contains a single 'option-space' character. The ascending sort (on column D) has not yet been done.
    Regards,
    Barry

  • All rows have same result

    hi,
    I use iis on windows 2003, php 5.2.4 and istantclient 10g.
    I want exec a select query on a oracle server view.
    But , when i exec the php page , all the rows of the html table have the same result.
    This is my code:
    <?php
    // Create a persistent connection to Oracle
    // Connection will be reused over multiple scripts
    $conn = oci_pconnect('tdb', 'tdb', '//1.1.1.1/A');
    if (!$conn) {
    $m = oci_error();
    echo $m['message'], "\n";
    exit;
    else {
    print "Connected to Oracle!";
    $query = 'select tcpip from TDB';
    $stid = oci_parse($conn, $query);
    $r = oci_execute($stid);
    // Fetch the results in an associative array
    print '<table border="1">';
    while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS+OCI_ASSOC)) {
    print '<tr>';
    foreach ($row as $item) {
    print '<td>'.($item?htmlentities($item):' ').'</td>';
    print '</tr>';
    print '</table>';
    // Close the Oracle connection
    oci_close($conn);
    ?>
    any suggestion ...

    thanks, i have resolved...
    i have insert "DISTINCT" in my query and all is ok...
    Regards

  • R12 Importing invoices all distributions have same description

    I am currently working on an import of invoices and invoice lines for R12 utilizing the interface tables and Payables Open Interface Import process. This process is working great except for one small issue. When you click on an invoice that has been imported in the invoice workbench screen and click "All distributions" the Line Number at the top of the screen will change as you click through the lines but the Line Description does not change. In the body you can see that the line descriptions are all different (and account #'s). The account description on the bottom changes as well.
    I don't know if it matters or not but on the left under "Num" they are all 1.
    This is 12.1.3

    This is a known bug with Financials. It's not considered a priority since the line description is ont he actual line (not at the top). So it's not a problem after all, just an issue witht he form.

  • Find Whether Array Element have same element in all index

    Hi ,
    I need to check if an array have the same element in all its indexes.(Example: An Array of Size 4, should have index 0 ..index 3 as 1 and during next iteration let it be number 2 in all indexes......how do I check if all index have same number)
    Attached the VI I did.
    Anyone can suggest better than this.
    Solved!
    Go to Solution.
    Attachments:
    Check array_For Same Element.vi ‏12 KB

    get the first element , compare it with the hole array , AND all elements
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Need sql query for all employees list which are having lessthan maximum salary of manager in same departmnet;

    HI
    I want a sql query i.e., all employees list which are having lessthan maximum salary of manager in same departmnet;
    my table is like this
    employees
    EMPLOYEE_ID                               NOT NULL NUMBER(6)
    FIRST_NAME                                                   VARCHAR2(20)
    LAST_NAME                                 NOT NULL    VARCHAR2(25)
    EMAIL                                     NOT NULL          VARCHAR2(25)
    PHONE_NUMBER                                              VARCHAR2(20)
    HIRE_DATE                                 NOT NULL        DATE
    JOB_ID                                    NOT NULL           VARCHAR2(10)
    SALARY                                                           NUMBER(8,2)
    COMMISSION_PCT                                          NUMBER(2,2)
    MANAGER_ID                                                  NUMBER(6)
    DEPARTMENT_ID                                             NUMBER(4)
    if need the department table
    departments:
    DEPARTMENT_ID                        
    NOT NULL NUMBER(4)
    DEPARTMENT_NAME                      
    NOT NULL VARCHAR2(30)
    MANAGER_ID                                    
    NUMBER(6)
    LOCATION_ID                                   
    NUMBER(4)

    Try this:
    select
       employees.last_name || ', ' || employees.first_name “Employee”,
       employees.salary “Emp Salary”,
       sub.salary “Mgr Salary”,
       employees.department_id  “Department” 
    from
       employees,
       (  select
          mgr.department_id dept,
          max(mgr.salary) salary     
       from
          employees,
          employees mgr      
       where
          employees.mgr = mgr.employee_id      
       group by
          mgr.department_id) sub   
    where
       employees.department_id = sub.dept      
       and employees.salary < sub.salary
    Jeff

  • Hi All, I have question about the iMac operating system. I have the last updated. The problem when I manage the place of the folder windows they are all mixing up. I mean they not on the place where I left them. how to set they stay on the same place. Tks

    Hi All, I have question about the iMac operating system. I have the last updated. The problem when I manage the place of the folder windows they are all mixing up. I mean they not on the place where I left them. how to set they stay on the same place? I know there are different possibilities to set.
    I tried but it not helped for me. What I can do? How and where can set this they stay on their place?
    Thanks.
    laci

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In Library Manager it's the FIle -> Rebuild command)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. 
    Regards
    TD 

  • I have three iPhone 4 models purchased in late 2010 that all share the same iTunes account (apps, music, etc), but I can only update the software on one of the three iPhones. What is the best solution to manage these devices for software updates, apps?

    I have three iPhone 4 models purchased in late 2010 (for my family) that all share the same iTunes account for access to apps and music, but each phone/user still has his/her custom contact list, email accts, and select lists of apps and music from the one iTunes acct library.  The problem is I can only update the software on one of the three iPhones – the primary phone I used to setup the iTunes acct. What is the best solution to manage these devices for software updates, apps? This is probably a common problem with families wanting to share apps and music without realizing the issues created by this approach. As it stands today... the first (primary) iPhone associated with the iTune acct has been updated with the latest software version 5.1.1 and sync'd up with all the apps, music, etc from the one iTune acct, while the other two iPhones are still running on the original software version 4.0.2 and are experiencing problems now. I was advised by AT&T back in January that it would be necessary to setup separate iTunes accts for the second and third iPhones in order to receive system updates. The problem would be how to keep all the apps, etc from being deleted off the second and third phones that were originally loaded from the one iTunes acct. Since this AT&T advice was prior to iCloud coming out, would iCloud be a better solution or at least part of the solution? I really don't yet understand how iCloud works. Hopefully, someone out there can help me??  Please?

    I have three iPhone 4 models purchased in late 2010 (for my family) that all share the same iTunes account for access to apps and music, but each phone/user still has his/her custom contact list, email accts, and select lists of apps and music from the one iTunes acct library.  The problem is I can only update the software on one of the three iPhones – the primary phone I used to setup the iTunes acct. What is the best solution to manage these devices for software updates, apps? This is probably a common problem with families wanting to share apps and music without realizing the issues created by this approach. As it stands today... the first (primary) iPhone associated with the iTune acct has been updated with the latest software version 5.1.1 and sync'd up with all the apps, music, etc from the one iTune acct, while the other two iPhones are still running on the original software version 4.0.2 and are experiencing problems now. I was advised by AT&T back in January that it would be necessary to setup separate iTunes accts for the second and third iPhones in order to receive system updates. The problem would be how to keep all the apps, etc from being deleted off the second and third phones that were originally loaded from the one iTunes acct. Since this AT&T advice was prior to iCloud coming out, would iCloud be a better solution or at least part of the solution? I really don't yet understand how iCloud works. Hopefully, someone out there can help me??  Please?

  • Can I share iTunes with others in my family or do we have to all buy the same songs since we have different apple IDs?

    I am new to iTunes and am wondering if I can share iTunes with my family or do we just have to all purchase the same songs multiple times since our devices have different apple ID's.  My iPhone was set up last year to one iTunes ID and I just got an iPad but it has a different apple ID. So I can't even share with myself! It seems stupid to have my husband and I both purchasing the same music.

    There are two ways to share your content. The simplest is just to use homesharing. Simply set up homesharing on each device from the iTunes advanced menu (you need to use the same details on each computer), providing the computers are on the same network they should see each other and can be found in the list on the left hand side of the iTunes window.
    The second way is to transfer the content to another computer, play it and authorise it to play content from that account by entering the original account password when prompted (this only needs doing once for each account, not for each tune)

  • HT1451 Hi All, I have 2 users on my desktop, 1 i-tunes account and log-in but both users have different music contents i.e. one has the full iTunes library and the other only has some songs. How do i get both users to have the same music content?

    I Have 2 users on my computer and both access i-tunes using same password etc. however 1 library has the full content of music but the other one has only partial playlists. How do I get both users to have the same full library?

    The title of my initial post is a bit misleading. I already took a chance deleting one of the iPhones, hoping if I deleted the wrong one, I can still reauthorize it (all with the same Apple ID acct, so not subject to 90-day waiting period, right?) The iTunes database just updated itself, and it says I have 4 "devices" "in the Cloud", but 5 "computers" associated w my account. How can I find out what computers are associated? Isn't there a list I can see? I dont have a clue what computers they might be. If I use the  "Deauthorize All" option, is it a pain to add them all back in. I assume I would have to log in from each computer to reauthorize each one. Would I have to be running the newest OS or version of iTunes to reauthorize? I think I have a PowerBook G4 Titanium with an older OS and iTunes. I'd like to keep that authorized, if possible.

  • I had iTunes on my old computer and I am trying to get all of the same music on my new computer. I have download iTunes and signed in, but it is not showing up in my library. How do I get all of my old music back?

    I had iTunes on my old computer and I am trying to get all of the same music on my new computer. I have download iTunes and signed in, but it is not showing up in my library. How do I get all of my old music back?

    It does not magically appear in a new place.  It will only be where you put it.
    Copy everything from your old computer, or your backup copy of your old computer, to your new one.

Maybe you are looking for