SELECT INTO SELECT CAN IT ACCEPT MORE THAN ONE LINE ?

Hi i have a table that i have to fill with information from an old one, but there are two colomns that i have to fill with another table. So here is the select that i will use with the insert part.
select
id_migration_mig,
(select a.id_instance_ins
from gdiexp.t_instance a, gdiprod.t_migration_detail b, gdiexp.t_bd c
where a.id_instance_ins = c.id_instance_ins and c.id_base_donnee_bd = b.id_instance_ins_actuelle),
(select a.id_instance_ins
from gdiexp.t_instance a, gdiprod.t_migration_detail b, gdiexp.t_bd c
where a.id_instance_ins = c.id_instance_ins and c.id_base_donnee_bd = b.id_instance_ins_cible),
type_environnement,
date_migration,
donnees_sources,
date_au_plus_tot,
methode,
date_dern_maj_ctrl,
code_usager_ctrl
from gdiprod.t_migration_detail;
problem is that this gives me a ORA-01427: single-row subquery returns more than one row. How can i solve that ? Thanks.

Your queries in the select clause need to be correlated witt the rows you are selecting from gdiprod.t_migration_detail. You should not need to have gdiprod.t_migration_detail in those queries. I believe that you need something more like:
select id_migration_mig,
       (select a.id_instance_ins
        from gdiexp.t_instance a, gdiexp.t_bd c
        where a.id_instance_ins = c.id_instance_ins and
              c.id_base_donnee_bd = md.id_instance_ins_actuelle),
       (select a.id_instance_ins
        from gdiexp.t_instance a, gdiexp.t_bd c
        where a.id_instance_ins = c.id_instance_ins and
              c.id_base_donnee_bd = md.id_instance_ins_cible),
       type_environnement, date_migration, donnees_sources, date_au_plus_tot,
       methode, date_dern_maj_ctrl, code_usager_ctrl
from gdiprod.t_migration_detail md;You query, and my re-written version are essentially outer joins, and could be re-written as such. If you are sure that there will always be a match, that is, when oyu insert into your table, the columns populated by the scalar queries are never null, then it could (and probably should) be re-written as a equi-join.
John

Similar Messages

  • More than one line beside a category icon

    Hello,
    I have in a page placed the text item category icon, and space a then the display name of the item. The problem is that as the text of the display name is too long when it makes an automatic return makes it under the category icon. It seems to be a problem with the number of text lines that can be placed beside the category icon.
    How can I make that the category icon accepts more than one line of text beside it?
    Thanks in advance,
    Izzat Sabbagh
    ITC

    I'm sure you can use html, like
    String tooltip = "<html>first line<br>second line</html>";Perhaps it works without html if you use newline '\n'.

  • Shell script how getopts can accept more than one string in one var

    In shell script   how  getopts  can  accept  more than one string in one variable    DES
    Here is the part of shell script that accepts variables  from the Shell script  but the   DES   variable does not accepts more than one variable.,  how to do this ??
    When i run the script like below
    sh Ericsson_4G_nwid_configuration.sh   -n  orah4g    -d   "Ericsson 4g Child"    -z Europe/Stockholm
    it does not accepts    "Ericsson 4g Child"    in  DES  Variable   and only accepts    "Ericsson"  to DES variable.
    how to make it accept     full   "Ericsson 4g Child" 
    ========================================
    while getopts “hn:r:p:v:d:z:” OPTION
    do
      case $OPTION in
      h)
      usage
      exit 1
      n)
      TEST=$OPTARG
      z)
      ZONE="$OPTARG"
      d)
      DES="$OPTARG"
      v)
      VERBOSE=1
      usage
      exit
      esac
    done

    Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_Code
    Also, see http://mywiki.wooledge.org/Quotes

  • How Can I Update More Than One Ipod on the Same Computer?

    I've had my 30G Ipod since April 2006. For Christmas 2006, I bought my sister a 2G Ipod. I cannot figure out how to put songs on her Ipod as we both share the same computer and Itunes Library. I've already asked Ipod Corporate for help via their FAQ section regarding more than one Ipod operating with the same computer, but their advice (which told me to create a playlist small enough for her Ipod and checked as a shared playlist) did not work for me. I'd really appreciate any help with my problem. Owning an Ipod but being unable to listen to it, as I'm sure many people would agree, is quite annoying.

    There are basically two ways of using multiple iPods on a computer and these involve:
    a) Sharing a single iTunes library and user account.
    b) Creating multiple user accounts and having separate libraries.
    Sharing a Library
    If you want to share the one library, you can set either or all of the iPods so that they only get updated with only certain playlists (you can update from more than one if you wish):
    Loading songs onto iPod automatically - Windows
    Choosing the update option "Sync Music - Selected playlists" allows you to create a playlist specifically for the iPod and drag the tracks you want into it. If you tire of the list and want to change it, you just add or remove the songs you don't want. The ones you take out out remain in the library to be used some other time if you choose. You can read more about playlists at these links:
    iTunes: Creating playlists of your favorite songs
    How to create a Smart Playlist with iTunes
    However since you seem to have a problem with that method you can choose to update any or all of the iPods manually and just drag whatever content you want to them: Managing content manually on iPod
    Separate User Accounts
    Another option is to create a separate User account for each person on your PC or Mac. Different accounts by definition would give you completely separate libraries. Each account has it's own iTunes folder, Library and iTunes Music folder and you load it with CDs etc just as you did with your original one. The iPod can be set to update however the owner chooses, sync all, manual or sync specific playlists
    If you are unfamiliar with setting up Windows user accounts you can read more here: Using Windows XP User Accounts

  • In Imovie '11, how can I drag more than one set of video clips to my project?

    In  Imovie '11, how can I drag more than one set of video clips into my project.  I know how to highlight in yellow and drag the set, but can I drag a group of sets?  Thanks

    To select multiple clips, hold down the command key as you click multiple clips. Then you can drag them all at once.
    To drag all clips at once, select one, then Edit/Select All. Then drag them all.

  • How can i place more than one photo on the print sheet

    im trying to place more than on photo on a sheet of photo paper, how do I do this

    There are basically two ways of using multiple iPods on a computer and these involve:
    a) Sharing a single iTunes library and user account.
    b) Creating multiple user accounts and having separate libraries.
    Sharing a Library
    If you want to share the one library, you can set either or all of the iPods so that they only get updated with only certain playlists (you can update from more than one if you wish):
    Loading songs onto iPod automatically - Windows
    Choosing the update option "Sync Music - Selected playlists" allows you to create a playlist specifically for the iPod and drag the tracks you want into it. If you tire of the list and want to change it, you just add or remove the songs you don't want. The ones you take out out remain in the library to be used some other time if you choose. You can read more about playlists at these links:
    iTunes: Creating playlists of your favorite songs
    How to create a Smart Playlist with iTunes
    However since you seem to have a problem with that method you can choose to update any or all of the iPods manually and just drag whatever content you want to them: Managing content manually on iPod
    Separate User Accounts
    Another option is to create a separate User account for each person on your PC or Mac. Different accounts by definition would give you completely separate libraries. Each account has it's own iTunes folder, Library and iTunes Music folder and you load it with CDs etc just as you did with your original one. The iPod can be set to update however the owner chooses, sync all, manual or sync specific playlists
    If you are unfamiliar with setting up Windows user accounts you can read more here: Using Windows XP User Accounts

  • HT1657 Can you rent more than one movie at the same time?

    Can you rent more than one movie at the same time on itunes?

    I think Justin is correct and you should have statistics in place and a reasonable partition scheme so that the optimizer selects the correct partitions rather than telling it what to do. You paid a lot for partitioning after all.
    There are some, possibly misguided, examples in the manuals showing how to create a view so you can delete from a single partition without specifying the partition criteria in the delete statement. This in effect turns partitioning back into DIY partitioning i.e. separate tables, union all and pretend its a single logical table using a view. But backwards.
    So to do what you want you just assume the partitions are separate tables, and then use union all to glue the ones you want back together.
    select * from sales partition (sales_q1_2000)
    union all
    select * from sales partition (sales_q1_2001)
    union all
    select * from sales partition (sales_q1_2003)
    union all
    select * from sales partition (sales_q1_2004);It probably goes without saying that as well as making the expensive version of partitioning behave like the free alternative, there is the possibility that it will perform like it as well.

  • Can you have more than one iTunes account on the same computer?

    My wife just got a nano and wants to set up her itunes library. Since we have different tastes in music, I thought we should have separate libraries under our separate log-ins to our PC so that her music didn't upload to my iPod and vice versa. Is that the right approach or is there a better way?

    There are basically two ways of using multiple iPods on a computer and these involve:
    a) Sharing a single iTunes library and user account.
    b) Creating multiple user accounts and having separate libraries.
    Sharing a Library
    If you want to share the one library, you can set either or all of the iPods so that they only get updated with only certain playlists (you can update from more than one if you wish):
    Loading songs onto iPod automatically - Windows
    Choosing the update option "Sync Music - Selected playlists" allows you to create a playlist specifically for the iPod and drag the tracks you want into it. If you tire of the list and want to change it, you just add or remove the songs you don't want. The ones you take out out remain in the library to be used some other time if you choose. You can read more about playlists at these links:
    iTunes: Creating playlists of your favorite songs
    How to create a Smart Playlist with iTunes
    Or you can choose to update any or all of the iPods manually and just drag whatever content you want to them: Managing content manually on iPod
    Separate User Accounts
    Another option is to create a separate User account for each person on your PC or Mac. Different accounts by definition would give you completely separate libraries. Each account has it's own iTunes folder, Library and iTunes Music folder and you load it with CDs etc just as you did with your original one. The iPod can be set to update however the owner chooses, sync all, manual or sync specific playlists

  • Can Function Return more than One Values ??

    Hi Experts,
    I would like to ask you Can Function Return more than one values. I Used Function with Out and In out parameter and its working Fine..
    1. what is harm using Out and In out parameter in function
    2. if we can use Out and In out parameter in Function so what is deffernce between procedure and Function.
    3. Is there any Other Way Though which we can return more the One values in Function.
    Please advice me...
    Thanks
    Umesh Goel

    Yes/No.
    You can return multiple value from function. But, in PL/SQL and not in a SQL.
    The following examples demonstrate that -
    SQL*Plus: Release 9.2.0.1.0 - Production on Wed Mar 28 17:41:15 2007
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> create or replace package glob
      2  as
      3    b varchar2(20);
      4    c varchar2(20);
      5  end;
      6  /
    Package created.
    SQL>
    SQL> create or replace function test_mul_out(a in number)
      2  return number
      3  is
      4    cursor c1(eno in number)
      5    is
      6      select ename,job,sal
      7   from emp
      8   where empno = eno;
      9  
    10    rec c1%rowtype;
    11    d  number(10);
    12  begin
    13    open c1(a);
    14    loop
    15      fetch c1 into rec;
    16      exit when c1%notfound;
    17       glob.b:= rec.ename;
    18    glob.c:= rec.job;
    19    d:= rec.sal;
    20    end loop;
    21    close c1;
    22    return d;
    23  end;
    24  /
    Function created.
    SQL> set serveroutput on
    SQL>
    SQL> declare
      2    zz  number(10);
      3  begin
      4    select test_mul_out(7777)
      5    into zz
      6    from dual;
      7    
      8    dbms_output.put_line('Ename: '||glob.b);
      9    dbms_output.put_line('Job: '||glob.c);
    10    dbms_output.put_line('Sal: '||zz);
    11  end;
    12  /
    Ename: Avik
    Job: CLERK
    Sal: 3456
    PL/SQL procedure successfully completed.
    SQL> Regards.
    Satyaki De.

  • Can you have more than one ipod on the same computer?

    me and my sister live together and we would like to be able to have two seperate libraries on the same computer. one library is already there and when the second ipod is plugged in, it comes up as a sub-library that is unacessable.

    There are basically two ways of using multiple iPods on a computer and these involve:
    a) Sharing a single iTunes library and or user account or
    b) Creating multiple user accounts.
    Note: When you are sharing an iTunes library, you don't have to set each iPod to update in the same manner, you can mix and match from the options below as each iPod has it's own update settings
    Sharing a Library and/or User Account
    If you want to share the one library, you can set either or all of the iPods so that they only get updated with only certain playlists (you can update from more than one if you wish):
    Loading songs onto iPod automatically - Windows
    Choosing the update option "Sync Music - Selected playlists" allows you to create a playlist specifically for the iPod and drag the tracks you want into it. If you tire of the list and want to change it, you just add or remove the songs you don't want. The ones you take out out remain in the library to be used some other time if you choose. You can read more about playlists at these links:
    iTunes: Creating playlists of your favorite songs
    How to create a Smart Playlist with iTunes
    Or you can choose to update any or all of the iPods manually and just drag whatever content you want to them: Managing content manually on iPod
    Loading the iPod shuffle differs slightly but it can still be used with the others, for details have a look at this page: Loading songs onto iPod shuffle - Windows
    It's also possible to have multiple libraries in a single account. To create or access a second (or more) library, hold down the Option key (or Shift key in Windows) when launching iTunes 7. In the resulting dialogue you will get the option to create a new library or navigate to the other Library.
    Note: You can only have one Library open at a time and iTunes will default to the last library opened if you don't use the keyboard command to choose one. This can prove tricky when using multiple iPods, if you don't use the keyboard command you can risk syncing to the wrong library:
    Using multiple iTunes libraries -Windows
    Separate User Accounts
    Another option is to create a separate User account for each person on your PC or Mac. Different accounts by definition would give you completely separate libraries. Each account has it's own iTunes folder, Library and iTunes Music folder and you load it with CDs etc just as you did with your original one. The iPod can be set to update however the owner chooses, sync all, manual or sync specific playlists
    I don't use Windows so I can't give you a step by step on that one, however I can point you to another web page which should help you out. You can read about Windows user accounts here:
    Using Windows XP User Accounts

  • How can I import more than one photo album onto my iPad

    Help! Can I import more than one photo album onto my IPad from my PC and if so how?

    Yes and it's very easy to do once you know what to do.
    Place all of the photo albums that you want to transfer to the iPad into one main photos album on your PC. When your iPad is connected to your computer's iTunes and after you have selected the iPad under Devices, click on the Photos tab and in the Sync Photos from heading - select that main photos album that you place all of your other photos folders into - select each album that you want to sync - and then click on Apply in the lower right corner to sync the photos to the iPad.
    iTunes: Syncing photos - Apple

  • Can I have more than one iCloud account?

    Can I have more than one iCloud account?

    One option is to start backing up one of them to your computer using iTunes instead.  To do this, go to Settings>iCloud>Storage & Backup and turn off iCloud Backup.  After that the device will start automatically backing up to your computer when you sync it with iTunes.
    Another option is to migrate your iPad, along with a copy of the iCloud data to a different account.  To do this, start by saving any photo stream photos that you want to keep on it to the camera roll (unless already there) by opening your my photo stream album, tapping Select, tapping the photos, tap the share icon (box with upward facing arrow), then tapping Save to Camera Roll.  If you are syncing notes with iCloud that you want to keep on your iPad, you'll need to open each of your notes and email them to yourself so you can later copy and paste the text into new notes created in your new account.  Then go to Settings>iCloud, tap Delete Account (which only deletes the account from your iPad, not from iCloud; your phone won't be effected by this), provide the password to turn off Find My iPad and choose Keep on My iPad when prompted.  Then sign back in with a different Apple ID to create the new account and choose Merge to upload your data to the account.  The disadvantage of this is that once your phone and iPad are on different accounts, they will no longer sync data with each other using iCloud.

  • How can I send more than one document on an email

    how can I send more than one document on one email

    Thank you but I understand that form of attaching a document. However when I select a document then click 'Share' I have the option of sending the document by email as a word or pages document or pdf, what I want to know is can I use this procedure to send more than one document per email and if I can how?

  • How can I send more than one foto in a email

    How can I send more than one foto in a email?

    Or, to send up to 5 photos in one email, open the Photos app, go to the Album containing the photos, tap Select, tap up to 5 photos (a blue tick will appear on them), then tap the Share icon (square with arrow pointing up) and choose Mail.
    If you choose more than 5 photos this way, you won't get the Mail option.

  • HT2731 can i have more than one apple id on a computer? As when we go away we want to facetime from our macpro to our main mac at home and both are registered under the same apple ID. Thanks

    Can you have more than one apple id on a computer. We are going away and want to facetime from our macpro to the mac computer at home but both are registered under the same apple ID. What should we do ?

    I will share with you what I have done to manage this with my family.  While the solution isn't without flawes, it seems to do the trick.  First, you need to have one person who is managing the synching of everyone's devices.  In my family, I have three iphones, about to be four, and five ipads.  We all synch to the same apple ID to allow one another to take seemless advantage of our Itunes, which is on our Imac.  To synch individual music or video interests, we simply select which playlists we want and manually synch that way.  A couple of us use imatch and the cloud to make the entire library accessable as well.  With respect to the imessage, mail, contacts, etc. we each have a gmail account for our individual emails, contacts etc.  So for instance, my forth grade daughter has a gmail account that we choose to synch her contacts, calendar, etc to and then that is also the account where she receives her imessages from on her ipad and itouch. My son, who has an iphone and ipad, does the same thing, but under settings, he goes to imessage and checks his phone number and his email as his preferred way to receive imessages and texts.  My wife and I do the same thing.  To avoid having everyone see one anothers contracts etc, we only synch contacts from our individual email accounts.  Here is the downfall to this:  When you update your phone or add a new device, apple always wants to reset everyone's facetime and imessage settings and then low and behold we are all receiving imessages from one another's friends etc.  To work around this, I simply take each of their devices and go to their imessage settings and only check the email and phone numbers relative to their devices.  I dont' know is this is the best solution, but it seems to work for us. 

Maybe you are looking for

  • Variable screeen popup with button in bex

    Hi , When I try to display variable screen using a button in bex, I get the following error. has anyone come across this. pls advise. BExItemButton.RenderData01: Unable to get the Item property of the OLEObjects classErr: Unable to get the Item prope

  • I'm trying to reinstall Photoshop CS4

    I'm trying to reinstall Photoshop CS4 after I had a computer repair. I have my key and I downloaded the 2 files on the adobe dl page for CS4, There's a _LS1 file of 1,200 KB and a larger _LS2.7z file of 796M.  But when I double-click on the LS1 files

  • MDB cannot loads enitities if more than 10 concurrent messages are sent tog

    Hello, I have seen a weird behavior of the MDB in Jboss or perhaps in transaction management. Here is a my scenario I have a session bean sb, an entity bean e and a message driven bean mb When a request comes to sb , it persists a new entity e and se

  • Work with PCI-6052E and PCI-6601 simultaneously

    Hi, I'm working with PCI-6052 for bufered data output and PCI-6601 for read two encoders at same time, when I work with single board I don't have problems but when I work both simultaneously I have a problem only I can out data or only I can read the

  • Is it possible to change the touchpad settings back to an older version after updating to maverick?

    Hello! I just updated to Maverick (really late I know) and I found that I really dislike the new options for the touchpad. My question is the following: Is is possible to change it back to the old options while keeping the new OS? Hope you can help m