Problem in update query

I want to set member = 1 if the company.coemail = totalYpages.email
update totalYpages set member=1 where member=(select coemail from users)
                                              *
ERROR at line 1:
ORA-01427: single-row subquery returns more than one row
Thank you

Hello

Try this:

Update totalYpages set = 1 member where

totalYpages.email = (SELECT coemail FROM compnay WHERE company.coemail = totalYpages.email AND ROWNUM = 1);

Kind regards

Tags: Database

Similar Questions

  • Update query not in AND not exists

    The following update query hangs

    {code}

    Update EMP

    define the EMP. SAL_FLAG = 1

    EMP. SAL_EFFECTIVE_DATE = to_date ('20140101', 'YYYYMMDD')

    If EMP.ID not in (SELECT ID

    of the Department

    When TREATED = 'Y '.

    )

    AND EMP. SAL_FLAG = 0

    AND EMP. SAL_EFFECTIVE_DATE < = to_date ('20140101', 'YYYYMMDD')

    {code:}

    Out of the PLAN is

    ---------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                     | Lines | Bytes | Cost |    TQ | IN-OUT | PQ Distrib.

    ---------------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                          | 13700 |   254K |    22 M |        |      |            |

    |*  1 |  FILTER |                          |       |       |       |        |      |            |

    |   2.   COORDINATOR OF PX |                          |       |       |       |        |      |            |

    |   3.    PX SEND QC (RANDOM). : TQ20000 | 13700 |   254K |  1995 |  Q2, 00 | P > S | QC (RAND) |

    |   4.     ITERATOR BLOCK PX |                          | 13700 |   254K |  1995 |  Q2, 00 | ISSUE |            |

    |*  5 |      TABLE ACCESS FULL | EMP                      | 13700 |   254K |  1995 |  Q2, 00 | SVCP |            |

    |   6.   COORDINATOR OF PX |                          |       |       |       |        |      |            |

    |   8 S    PX SEND QC (RANDOM). : TQ10000 |     2.    20.  3334.  Q1 00 | P > S | QC (RAND) |

    |   8.     ITERATOR BLOCK PX |                          |     2.    20.  3334.  Q1 00 | ISSUE |            |

    |*  9 |      TABLE ACCESS FULL | DEPT                     |     2.    20.  3334.  Q1 00 | SVCP |            |

    Can someone help me solve this problem? The TWO ID of 2 tables have an index

    Waiting for your spare update queries

    Thank you

    S

    Maybe

    merge into e emp

    using (select id

    of the Department

    when transformed! = « Y »

    ) d

    on (e.id = d.id)

    when matched

    then update

    Set e.sal_flag = 1,

    e.effective_date = date ' 2014-01-01'

    Concerning

    Etbin

  • I must be the most simple update query!

    Hi all

    I'm trying to run an update query that should be simple, that he gets, an inner join between two tables setting the value of a column non-joining tables to the value of the other tables non-joining column:

    SQL > update compound c
    2 set cmpname =)
    3. Select xname
    temp_foo 4 f
    5 where c.cmpcorporateid = f.xcorpid);

    146917 lines to date.

    Problem is that temp_foo has only one record and that only one record is a record in the compounds. How to limit the search to this record?

    Thanks for any help!

    Hello

    Since you do not have a WHERE clause in the UPDATE statement itself, all rows will be modified.
    Try this:

    update  compounds      c
    set      cmpname = (
                select  xname
                from        temp_foo     f
                where   c.cmpcorporateid = f.xcorpid
                )
    -- From here down is all new
    WHERE   xcorpid IN (
                 SELECT  cmpcorporateid
                 FROM        temp_foo
                 );
    

    If you think that's duplicate most of the work of the subquery, you are absolutely right!
    You can use the MERGE command to avoid this kind of duplication.

  • Update query does not work (ora-01427)

    RDBMS 10 g 2

    Long story short, I created a column in a table in another table, that it has been moved is not really necessary that all other information is stored in other tables. With the original column has values that need to be copied to the new column before the old table is deleted.

    I use this update query:
    update bi_req bir
       set bir.job_name =
            (select distinct bij.job_name
               from bi_jobs bij,
                    bi_freq bif,
                    bi_apps bia,
                    bi_req  bir
              where bij.fk_bi_req_id = bir.pk_bi_req_id
                and bia.pk_bi_apps_id = bij.fk_bi_apps_id
                and bif.pk_bi_freq_id = bij.fk_bi_freq_id)
     where bir.job_name is null;
    If I run the select statement separately, I get the exact results that I need however, every time I run the whole statement, I get:
    Error: ORA-01427: single-row subquery returns more than one row

    The problem is that your subquery returns two or more names different jobs for a line of update.

    Which of these task names are you using? If it is not serious, then you can go with a like this aggregate query

    update bi_req bir
       set bir.job_name =
            (select max(bij.job_name) /* use just one job name */
               from bi_jobs bij,
                    bi_freq bif,
                    bi_apps bia
            where bij.fk_bi_req_id = bir.pk_bi_req_id
                and bia.pk_bi_apps_id = bij.fk_bi_apps_id
                and bif.pk_bi_freq_id = bij.fk_bi_freq_id)
     where bir.job_name is null;
    

    What I don't understand is why you need the bi_freq and bi_apps in the subquery. A simple query as follows: should not be enough?

    update bi_req bir
       set bir.job_name =
            (select max(bij.job_name) /* use just one job name */
               from bi_jobs bij
            where bij.fk_bi_req_id = bir.pk_bi_req_id)
     where bir.job_name is null;
    

    Published by: W. Sven on September 4, 2009 14:06

  • What is the problem with this query in the source

    A blank page is region 2. Region1: enter rec_no (-rec_no is varchar2) region2:hide and show that displays one record based on rec_ no region1 entered.
    The problem is that I get the following error

    ORA-06550: line 1, column 7: PLS-00428: an INTO clause in this SELECT statement

    Here's my simple query in a process of pl/sql
    Start
    Select rec_no, rec_name from mytable where rec_no = upper(:P16_rec_no);
    end;

    Why? The same query works under the sql command.

    what I'm trying to accompolish here, it is because he has given huge if I want to display hide also multiples, regions and allow users to update each region as a result. Help, please. It kills me that I just can't understand what is causing the problem to the query. Thank you.

    Hello

    The list is set to the field EMPLOYEE_ID itself? What is the primary key of the table? In my example, DEPTNO is the primary key and I used the element generated by the wizard page to display the list. The parameters of the Source of the item itself or the column DEPTNO and database so that the process "process line...". "to identify the updated row.

    Andy

  • Problems of updating Flash from Adobe

    I constantly get popups saying "firefox has prevented the obsolete plugin adobe flash of opening", but I can't seem to update the plugin.

    I tried to go through firefox for the website https://www.mozilla.org/en-US/plugincheck/ , but all I get is a spinning wheel. I tried to clear my cookies and refreshing firefox to fix it, but I always get the spinning wheel so I can't update my plugins via the Web site of firefox.

    Then, I went and downloaded the update directly from Adobe, but when I try to install I get an error message saying "your internet browser microsoft explore includes the latest version of adobe flash player" and it won't let me complete the installation. I checked that firefox is my default browser, but I still get the error message.

    I looked through many discussions on this help site, and nobody seems to have these two problems. They can update via the Mozilla Web site after updating to Firefox, or they have the fixed problem when updating through Adobe.

    I'm in Windows 8. Thank you

    http://www.Adobe.com/CA/products/flashplayer/distribution3.html

    Looks like you were trying to install the ActiveX version that is only for IE and not the version of database plugin for browsers like Firefox/SeaMonkey.

    Plugins like Flash, Java, Shockwave etc are installed on the system and not in Firefox and Firefox makes use of these Plugins.

  • problem with update of applications

    Hello, I had a problem to update my applications this screenshot above is always like that there not is finished. Can someone help me with this problem?

    Sign out of your Apple ID: settings > iTunes and App Store > Apple ID

    Force reboot

    Reconnect

  • I have a problem. Update of Flash Player required you must download and install the latest version of Adobe Flash Player to view this content. but my Flash player is up-to-date. I use ubuntu10.4, firefox 8.0

    I have a problem. Update of Flash Player required you must download and install the latest version of Adobe Flash Player to view this content. but my Flash player is up-to-date. I use ubuntu10.4, firefox 8.0

    You are welcome

  • Problem with update iOS 9.3!

    When I try to upgrade to iOS 9.3 he always tells me that I am not connected to the Internet, even though I am if it fails? What is happening with this download, never had this problem before?

    Many users have encountered problems to update their devices, their activation or signing into their account after updating iOS 9.3. Apple is aware of the problem and working on a fix.

    Take a look at these articles for additional information on the issue or adapt:

    If you are unable to activate your iPhone, iPad or iPod touch after installing iOS 9.3 - Apple Support

    If you are unable to activate your iPad 2 (GSM model) update to iOS 9.3If you cannot activate your iPad 2 (GSM model) updated to iOS 9.3

    Apple stops updates iOS 9.3 for iDevices older due to Activation Server Lock growing problems.

  • problems with update iOS 9.3 car bluetooth

    problems with update iOS 9.3 car bluetooth. break and cannot hear the caller voice calls.

    In what seems to be the same problem, this AM. iPhone 6, iOS 9.3, its stock of 2012 Honda Odyssey system. Worked well with iOS 9.1. With iOS 9.2 bluetooth would be occasionally disconnect, then reconnect about 5-10 seconds later. Reset all the settings bluetooth both phone and car with no improvement.

    IOS installed 9.3 last night. Phone connects, but the audio is unintelligible. Sound cut about every quarter of second, then reductions for about a quarter of a second, ad nauseam. Reset the phone without effect. Will try other things later today, but the phone is unusable with bluetooth, as is.

  • I have some problem in my query to sql server. If I press f5 to run it opens to record dialogue area nd do not run (I don't get successful... orders etc). Please help me

    I have some problem in my query to sql server. If I press f5 to run it opens to record dialogue area nd do not run (I don't get successful... orders etc). Please help me

    Hello

    SQL Server is not supported in these forums. I suggest that you ask your question again in one of the forums dedicated to Microsoft for him here:

    http://social.technet.microsoft.com/Forums/en-us/category/sqlserver .

    Thank you.   :)

  • HD T410s graphic problem after update

    A few days ago, I decided to update my 2011 T410s by Lenovo
    Toolbox. I was looking for solutions to improve the battery life. I have
    has chosen to update all 'important' and some option updates
    those I thought that could have an impact on the battery life (BIOS update, Intel HD graphics driver, thinkpad power management driver and a few others)

    Since I have lived a graphic break several times when I watch videos online such as
    thedailyshow.com or youtube.com. The first time a
    a message on the graphics driver (or something like that)
    has stopped working and has been restored but the next second the
    ventilation was repeated, monitor would go black and the
    graphics would begin slowly reappear, I'd still get a message
    on the graphics driver and the other second monitor would again
    black and so on... Now, I only get the message more difficult when it happens from the computer retrieves before leaving black. The only way to break the cycle is to restart
    the computer and everything works fine. Until I have watch another video. ! I tried uninstalling the driver HD and reinstalled (both reinstalled as Lenovo and Intel), and it still does not work.

    Suggestions? Is someone else had problems after updating?

    Please uninstall the display driver, and reinstall.

    Also, install the latest player adobe flash.

    Please watch the video file online and then check it in.

    Best regards

    Tanuj

  • Problems of updates Windows XP - how to fix the incorrect Windows XP updates KB2633952 keep asking to install?

    Problems of updates Windows XP - how to fix the incorrect Windows XP updates KB2633952 keep asking to install? True, it is that it is already installed on your computer. If hide us, an another previous KB2570791 arises in our updates of Windows and asked to install anything, that it was installed... of the questions repeated and very annoying.  Help, please!

    (Microsoft Answers just sent us message have deleted our previous thread, ask for help!) We are simply not that these problems are problems with Windows XP updates related to DST or not?)

    Nadia. PA supporter said that your computer is hacked. He may be right. I can't weigh because I don't know what led him to this conclusion. If your computer is hijacked, then you should address that more that you need to fix this minor update. However, under the resolution of your problem to update, you can try this:

    Assume Windows XP

    Check the C:\Windows\System32\ directory for the presence of the file tzchange.exe

    If the file is not present or if the version of the file is not 5.1.2600.6171 or newer...

    Download the update appropriate 2633952 for your platform here:

    http://support.Microsoft.com/kb/2633952

    Run with - extract switch (e.g., Start > run > "[path to the downloaded file] \WindowsXP-KB2633952-x86-ENU.exe"-x)

    Of course, replace [path to the downloaded file] with the path to the downloaded file.

    Citations may or may not be required depending on the path. Place the x - out the citations if you use them.

    Choose a location for the extracted files (a new folder is recommended)

    Locate the extracted files. File tzchange.exe you want and copy it into C:\windows\System32

    That rerun Windows Update detection to see if the problem is resolved.

  • problem with update of configuration

    my screen says stage 3 update 3 0% complete do turn off not computer then goes to a black screen with the words 'floppy drive 0 seek failure"says F1 to continue, F2 to enter setup then here I'm stuck what do I do?

    Windows Update Forum:

    It comes with Vista, upgrade install and activate Forum.

    You will get the best help for any problem of Update/Service Pack in the Windows Update Forum; the link below:

    http://social.answers.Microsoft.com/forums/en-us/vistawu/threads

    When you repost here, kindly include the Error Codes, and exactly what is happening when you try to update.

    In this way, you will receive the best help.

    See you soon.

    Mick Murphy - Microsoft partner

  • There was a problem of updates - Code 800 b 0101

    Hi all

    I am currently in the process of implementation 32 Surface RT tablets for my school and I managed with 31 of them. However, with a single device, I am having an error in WIndows Update that I can't update my device and therefore prevents me from installing Windows 8.1.
    When I choose to do a manual update, the message I get is:
    "There was a problem of updates:
    Error (s) found:
    Code 800 b 0101"
    I tried refreshing Windows and rearmament and had the same questions again and again. I tried troubleshooting from a number of websites with no luck. It is a last resort for me.
    A little history:
    The Tablet has changed or installed on it - it's a cool feature. However, he had an activation problem where I was unable to activate the machine online. To work around this problem, I ended up having to manually activate by phone. All other devices have been activated automatically via the internet.
    Any help to fix this would be appreciated!
    Kind regards
    Steve

    Solved the problem. It seems that not putting the right date, Microsoft did not update. Solution: Calendar set to correct the date and time and it should work. :)

Maybe you are looking for

  • Can you merge address books?

    I imported a number of address books and I want to merge them into one. Is this possible without having to manually copy each form of commitment to the other?

  • Lost all the podcasts of the iphone and itunes - backup went too - HELP!

    For some reason, all my podcasts FROM itunes and my iphone. Backup went too. Is it possible that I can access my itunes account and somehow to find the list of podcasts that I was subbed to so I can resub? Thank you

  • How to download Firefox on a USB?

    I already have Firefox on my computer. One of my friends does not have and want it but when I went to download it on IE it had sat 1% more than an hour. So, I got the brilliant idea of downloading it on my USB then install it on the computer it from

  • Re: Startup: problem with Satellite C650D

    Hey all. Whenever I try to boot my laptop it comes up with the following error for atheros pcie ethernet controller v2.0.1.9 (15/12/09) Check the connection of the cable!PCE - m0f: exit intel pxe romno boot device - insert boot disk and press any key

  • DVI/VGA

    I just bought a HP Pavilion p7-1154 desktop PC. After getting it home, I discovered that I could not connect my vga monitors. What type of card should I get?