Join AD mistake

Hello

After upgrade to ESXi 6.0 lost host authentication, Active Directory and now I cannot associate ourselves host to AD

Error

An internal error has occurred in the vSphere Client.

Join/usr/lib/VMware/Likewise/bin/domainjoin-CLI

Try this CLI option by going to ESXi Shell or doming SSH using putty in your ESXi 6.

Your host is configured with DNS servers are right?

Tags: VMware

Similar Questions

  • Joined the community of Apple support by mistake

    While trying to find the answer to a problem with iTunes, I joined the community of apple support by mistake thinking this, he had to join the blog.  I have little experience with support questions and desire to retire from this.  My email is now get 100 more per day - not that I can help with any questions.

    Suggestions welcome.

    Just click on your user name, and it will take you to your profile screen. Click on Preferences and disable the email option. You won't get email more.

    See you soon,.

    GB

  • I want to join LinkedIn and become a part of them, but to do that I have to share some things or information with them and someone ias which prevents me from doing this!

    Why someone stop me from joining thiws people? I want to be part of linked-in.com and I was for a while and I had a hard time with my writing and need to stop talking with them for a while, sorry about my spelling may be a little off tonight because my doctors have me on some serious drugs that they believe can help find out if I have cancer in my body , so please forgive me if I make mistakes. I'm honestly on this operation on an object.

    Hello

    It seems that you need to contact and work with the support of LinkedIn.

    LinkedIn - Contact us - help center
    https://help.LinkedIn.com/app/home/ls/1208%2C1226%2C2340%2C6003

    LinkedIn - Help Center
    https://help.LinkedIn.com/app/answers/list/LS/265%2C279%2C337%2C641

    LinkedIn - Customer Service
    http://contacthelp.com/directory/Internet/Web+sites/LinkedIn?ListingID=348

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • LAP1131AG loop without end of join (5.2.130.0, WLC 5.2.178.0 WCS)

    I have som Aironet LAP1131AG accesspoints, who, after an upgrade to 5.2 WCS (including the upgrade of WLC) will join not the controller.

    I have attached a dump of the console. The accesspoints will improve the image, if they are hardreset (by pressing reset for a few seconds during the reboot), but they will be I have a never ending quest to join (last good message is changed CAPWAP State to CFG)...

    We have 100 + accesspoints which are unaffected by the upgrade, but 2 accesspoints give me the same problem.

    Any ideas as what to try?

    -I would recommend that you use a browser to connect to your access point. The first page after logon has a good summary of the State of all interfaces.

    -For the mistake of WCS: are you using the same strings of SNMP and versions on WCS and on the AP? They must match (but I have never tried to add a point to independent access to the WCS).

  • Join the results of a case statement

    Hello everyone;

    I can't with a query where I use a case statement to create a new column and attempt to reach an additional table on the resulting column.  I am fairly new to this and learn by trial and error, so if you think that it looks a little ugly or ineffective, I won't be offended.  It is used on my interface based on the web of companies, while I am not able to answer some basic questions such as the version of db.

    My need to use the case statement is the result of some strange methods and somewhat contradictory in order to link the product subcodes (sku, fcsku, fnsku), to a product code parent (ProdID).  In this case, the inventory is stored in the first table with one of the few types of premises SKUs, however the dimensional data only links to the ProdID.  I'm trying to instruction box allows to send the parent a second table (ProdID) code if the sku is there, or a third table if it is found on this table.  The main reason (in this case) I have to this ProdID is I can join the dimensional data of a fourth table.

    My current query:

    SELECT / * + USE_HASH (dbin, sku, xProdID, msr) * /.

    dbin.snapshot_date, dbin.bin_id, dbin. ISBN,

    CASE WHEN sku. ProdID IS NULL THEN xProdID.ITEM_AUTHORITY_ID

    Of ANOTHER sku. ProdID

    END ProdIDMaster,

    dbin. OWNER, dbin. QUANTITY, dbin. CONTAINER_ID,

    MSR. HEIGHT, msr. WIDTH, msr. LENGTH, msr. WEIGHT, msr. DIMENSIONAL_UOM, msr. WEIGHT_UOM,

    MSR. HEIGHT * msr. WIDTH * msr. LENGTH as a Volume

    OF D_BIN_ITEMS dbin

    SKU of LEFT JOIN O_FCSKUS ON dbin. ISBN = sku. FCSKU

    LEFT JOIN (SELECT * FROM D_FNSKU_ProdID_MAP)

    WHERE REGION_ID = 1

    AND SNAPSHOT_DAY = TO_DATE('{RUN_DATE_YYYY/MM/DD}','YYYY/MM/DD')) xProdID

    ON dbin. ISBN = xProdID.FULFILLMENT_NETWORK_SKU

    LEFT JOIN (SELECT * FROM D_MP_ProdID_PKG_MEASUREMENTS)

    WHERE REGION_ID = 1 AND MARKETPLACE_ID = 1 AND PACKAGE_TYPE_ID = 1) msr

    ON ProdIDMaster = msr. ProdID

    WHERE dbin. WAREHOUSE_ID = "PHL5."

    AND dbin. Snapshot_date = TO_DATE('{RUN_DATE_YYYY/MM/DD}','YYYY/MM/DD')

    AND dbin.bin_id like '% P-1-R '.

    ORDER BY dbin.bin_id;

    The error I receive:

    Statement 1 is invalid. ORA-00904: "ProdIDMaster": invalid identifier

    ProdIDMaster appears only in two places, an alias for the case statement, as well as a side of the join statement.  If I simply change the alias name, it has no effect, so I can only assume the question is how I refer to results of the case statement. I also tried to reach the word 'CASE', which returned "1 statement is not valid. "ORA-00904:"The MATTER": invalid identifier.

    Any help or advice would be greatly appreciated.

    Post edited by: 8ea4344e-80ea-44e7-b8ac-d482be7245a7 I made a mistake when I posted the code.  The ProdID_ID shown in the join should have been ProdIDMaster.  I need to change this due to the fact that the name of the column used (which is what I based my alias on) may have been considered confidential information. All the other columns names remained unchanged.

    Hello

    8ea4344e-80EA-44e7-B8AC-d482be7245a7 wrote:

    Hello everyone;

    I can't with a query where I use a case statement to create a new column and attempt to reach an additional table on the resulting column.  I am fairly new to this and learn by trial and error, so if you think that it looks a little ugly or ineffective, I won't be offended.  It is used on my interface based on the web of companies, while I am not able to answer some basic questions such as the version of db.

    My need to use the case statement is the result of some strange methods and somewhat contradictory in order to link the product subcodes (sku, fcsku, fnsku), to a product code parent (ProdID).  In this case, the inventory is stored in the first table with one of the few types of premises SKUs, however the dimensional data only links to the ProdID.  I'm trying to instruction box allows to send the parent a second table (ProdID) code if the sku is there, or a third table if it is found on this table.  The main reason (in this case) I have to this ProdID is I can join the dimensional data of a fourth table.

    My current query:

    SELECT / * + USE_HASH (dbin, sku, xProdID, msr) * /.

    dbin.snapshot_date, dbin.bin_id, dbin. ISBN,

    CASE WHEN sku. ProdID IS NULL THEN xProdID.ITEM_AUTHORITY_ID

    Of ANOTHER sku. ProdID

    END ProdIDMaster,

    dbin. OWNER, dbin. QUANTITY, dbin. CONTAINER_ID,

    MSR. HEIGHT, msr. WIDTH, msr. LENGTH, msr. WEIGHT, msr. DIMENSIONAL_UOM, msr. WEIGHT_UOM,

    MSR. HEIGHT * msr. WIDTH * msr. LENGTH as a Volume

    OF D_BIN_ITEMS dbin

    SKU of LEFT JOIN O_FCSKUS ON dbin. ISBN = sku. FCSKU

    LEFT JOIN (SELECT * FROM D_FNSKU_ProdID_MAP)

    WHERE REGION_ID = 1

    AND SNAPSHOT_DAY = TO_DATE('{RUN_DATE_YYYY/MM/DD}','YYYY/MM/DD')) xProdID

    ON dbin. ISBN = xProdID.FULFILLMENT_NETWORK_SKU

    LEFT JOIN (SELECT * FROM D_MP_ProdID_PKG_MEASUREMENTS)

    WHERE REGION_ID = 1 AND MARKETPLACE_ID = 1 AND PACKAGE_TYPE_ID = 1) msr

    ON ProdIDid_ID = msr. ProdID

    WHERE dbin. WAREHOUSE_ID = "PHL5."

    AND dbin. Snapshot_date = TO_DATE('{RUN_DATE_YYYY/MM/DD}','YYYY/MM/DD')

    AND dbin.bin_id like '% P-1-R '.

    ORDER BY dbin.bin_id;

    The error I receive:

    Statement 1 is invalid. ORA-00904: "ProdIDMaster": invalid identifier

    ProdIDMaster appears only in two places, an alias for the case statement, as well as a side of the join statement.  If I simply change the alias name, it has no effect, so I can only assume the question is how I refer to results of the case statement. I also tried to reach the word 'CASE', which returned "1 statement is not valid. "ORA-00904:"The MATTER": invalid identifier.

    Any help or advice would be greatly appreciated.

    Whenever you have a problem, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements) of all the tables involved, so that people who want to help you can recreate the problem and test their ideas.

    Also post the exact results you want from this data, as well as an explanation of how you get these results from these data, with specific examples.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).  Use "SELECT * VERSION of $ v;" to get it.

    See the FAQ forum: Re: 2. How can I ask a question on the forums?

    When you define an alias for column (such as PriodIDMaster) in the SELECT a query clause, you can use the alias in the ORDER byclause in this request, but this is the only place in this same query, where you can use it.  If you want to use anywhere, like in a join condition, then calculate the new column in a subquery; then you can use it anywhere you want in a Super request.

    I see expression BOX (not the same as a declarationBOX) where when ProdIDMaster is defined, but I do not see where it is used.  Are you sure that you posted the code that is causing the problem?

  • join column Muti question

    We recently had a problem where we ran out of process on a single instance of the cluster so I will try to ask the DBA_HIST_ACTIVE_SESS_HISTORY to see which application has most of the sessions connected at the time.  After much research, I came with a view online but I can't figure out how to get the join condition to match the session ID and the session_serial # as a whole rather than individually.

    So if I run this query:

    Select distinct session_id, session_serial #.

    of DBA_HIST_ACTIVE_SESS_HISTORY

    where sample_time between to_date (28 Aug 14 12:01:00 am "," DD-MON-YY hh: mi: ss pm') and to_date (28 Aug 14 12:32:00 am ',' DD-MON-YY hh: mi: ss pm')

    and user_id! = 0

    and instance_number = 1;

    He returned 1507 lines.  That looks all right as a process parameter is set to 2000, when he made a mistake on.

    But when I try to get the number of session and group by user_id, charges are way off:

    Select e.user_id, count count (user_id)

    Join e DBA_HIST_ACTIVE_SESS_HISTORY

    (select distinct session_id, session_serial #)

    of DBA_HIST_ACTIVE_SESS_HISTORY

    where sample_time between to_date (28 Aug 14 12:01:00 am "," DD-MON-YY hh: mi: ss pm') and to_date (28 Aug 14 12:32:00 am ',' DD-MON-YY hh: mi: ss pm')

    and user_id! = 0

    and instance_number = 1) all_sess

    on e.session_id = all_sess.session_id

    and e.session_serial #= all_sess.session_serial #.

    E.user_id group;

    USER_ID COUNTY

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

    30                     6

    494 16921

    479 147385

    486 779

    490                    48

    I think that if I can get the join to match somehow the session_id and session_serial # together as a pair rather than compare each session_id and session_serial # separately, it might work.  Any help would be appreciated.

    Hello

    Boneist wrote:

    I think it is because you are trying to reach the subquery for the entire table, not only the rows in the specified period.

    Anyway, your request not could not just be reduced to:

    1. Select user_id, count (user_id) cnt
    2. (select user_id, session_id, session_serial #)
    3. of dba_hist_active_sess_history
    4. where sample_time between to_date (28 Aug 14 12:01:00 am "," DD-MON-YY hh: mi: ss pm') and to_date (28 Aug 14 12:32:00 am ',' DD-MON-YY hh: mi: ss pm')
    5. and user_id! = 0
    6. and instance_number = 1)
    7. Group of user_id;

    ?

    Or maybe

    Select user_id, count (user_id) cnt

    (select DISTINCT user_id, session_id, session_serial #)

    of dba_hist_active_sess_history

    where sample_time between to_date (28 Aug 14 12:01:00 am "," DD-MON-YY hh: mi: ss pm') and to_date (28 Aug 14 12:32:00 am ',' DD-MON-YY hh: mi: ss pm')

    and user_id! = 0

    and instance_number = 1)

    Group of user_id;

  • Join ORA_ROWSCN problem

    Hello

    I have problem with ORA_ROWSCN column when I join statement in SQL:

    Context:

    CREATE TABLE table_source(
      lib varchar(10)
    ) ROWDEPENDENCIES ;
    
    CREATE TABLE table_target(
      lib varchar(10),
      rowid_src ROWID,
      rowscn_src NUMBER
    );
    
    INSERT INTO table_source (lib) VALUES ('a');
    INSERT INTO table_source (lib) VALUES ('b');
    INSERT INTO table_source (lib) VALUES ('c');
    INSERT INTO table_source (lib) VALUES ('d');
    commit;
    
    INSERT INTO table_target ( ROWID_SRC, rowscn_src, lib) SELECT ROWID, ORA_ROWSCN, lib  FROM table_source;
    
    select ORA_ROWSCN, lib FROM table_source;
    
    -- ORA_ROWSCN LIB
    -- ---------- ----------
    -- 5056691355 a    
    -- 5056691355 b    
    -- 5056691355 c    
    -- 5056691355 d
    
    select rowscn_src, lib FROM table_target;
    
    -- ROWSCN_SRC LIB
    -- ---------- ----------
    -- 5056691355 a    
    -- 5056691355 b    
    -- 5056691355 c    
    -- 5056691355 d  
    
      update table_source set lib='a1' WHERE lib='a';
      commit;
    
      select ORA_ROWSCN, lib FROM table_source;
    
    -- ORA_ROWSCN LIB
    -- ---------- ----------
    -- 5056691393 a1   
    -- 5056691355 b    
    -- 5056691355 c    
    -- 5056691355 d
    
      select rowscn_src, lib FROM table_target;
    
    -- OWSCN_SRC LIB
    -- ---------- ----------
    -- 5056691355 a    
    -- 5056691355 b    
    -- 5056691355 c    
    -- 5056691355 d  
    
    
    

    OK, let's try to get the lines that have changed:

    SELECT src.lib
    FROM table_source src
    INNER JOIN  table_target target ON src.ROWID = target.rowid_src
    WHERE src.ORA_ROWSCN <> target.rowscn_src
    
    -- LIB
    ----------
    -- a1    
    -- b     
    -- c     
    -- d 
    
    ---------- EXPECTED:
    -- LIB
    ----------
    -- a1    
    
    

    The problem arises when we JOIN statemement:

    
    
    select count(*)
    FROM table_source src
    WHERE src.ORA_ROWSCN = 1;
    
    --   COUNT(*)
    -- ----------
    --          0
    -- OK !
    
    
    
    select count(*)
    FROM table_source src
    JOIN  table_target target ON src.ROWID = target.rowid_src
    WHERE src.ORA_ROWSCN = 1;
    
    --   COUNT(*)
    -- ----------
    --       4
    -- EXPECTED: 0 
    
    
    

    You can help me find my mistake.

    Thank you

    When you use the ANSI join syntax and have a question the FIRST thing you can do is to use a standard Oracle syntax.

    This seems to be one of the MANY bugs in the functionality of join 11.2.0.1.0 ANSI

    I can reproduce the problem by using YOUR code:

    SELECT src.lib
    FROM table_source CBC
    Target INNER JOIN table_target ON CBC. ROWID = target.rowid_src
    WHERE the CBC. ORA_ROWSCN <> target.rowscn_src

    LIB

    A1

    b

    c

    d

    But there is no problem if I use the standard join syntax

    SELECT src.lib
    Table_source CBC, table_target target
    where src. ROWID = target.rowid_src
    and
    CBC. ORA_ROWSCN <> target.rowscn_src

    LIB

    A1

  • Just looking for best way to do... 2 data joined tables

    looking for advice this.

    using oracle 11 g.

    I have data im going to use in a view to update TABLE1 monthly.im going to see all these data via php in a web page.

    I would like to add a few modifiable of table2 values who will join table1.

    -drop the table1 table:

    create table table1)

    number of value1,

    Number of value2,

    number of value3,

    Number of VALUE4,

    number of Value5

    );

    INSERT INTO TABLE1 (VALUE1, VALUE2, VALUE3, VALUE4, VALUE5) VALUES (1119,4,54,772,643);

    INSERT INTO TABLE1 (VALUE1, VALUE2, VALUE3, VALUE4, VALUE5) VALUES (22,345,55,278,446);

    INSERT INTO TABLE1 (VALUE1, VALUE2, VALUE3, VALUE4, VALUE5) VALUES (314,193,75,542,676);

    INSERT INTO TABLE1 (VALUE1, VALUE2, VALUE3, VALUE4, VALUE5) VALUES (13,396,59,232,670);

    INSERT INTO TABLE1 (VALUE1, VALUE2, VALUE3, VALUE4, VALUE5) VALUES (41,2003,505,232,7096);

    -select * from table1

    create the table2 table)

    VCLE NUMBER,

    NUMBER OF VERSION_NUM,

    COMMENTAIRES1 VARCHAR2 (50).

    comments2 varchar2 (50)

    );

    -select * from table2

    Vcle in table2 is a concatenation of value1, value2, value3 on table1.

    So the end result is on the web page of all the values in table 1, unmodifiable, 2 reviews in table2 fields that can be changed. A user can change these fields, then they will save in table2 with the key of concatenation. the reason why I want to do like this, with a second table is because whenever a user changes these fields I want to insert again to occur in this table, not an update, which will add a trigger, I have a new version number. This sounds like a mistake to do it this way?

    The strategy of the concatenation is a mistake.

    Concatenation requires strings, then you would be conversion 3 numbers to strings to concatenate, then convert it to a number stored in table2.

    If I insert = 11-v1, v2 = 11, v3 = 11 then insert v1 = 1, v2 = 11, v3 = 111.  I generates the same Vcle and either corrupt your data or make it impossible to tell what row in table1 = 111111 Vcle should concern.

    A substitution used as primary key in table 1 key is a way to fix this design.

  • Unable to join u1 VCSA 6 back to the domain. Error messages are not found anywhere online.

    I was wondering if someone can help troubleshoot me SSO with a VCSA to 6u1 running. PLEEASE!  This has been updated about a week ago of 6.0 and had no problems until he decided to collapse Monday. At this time, that we had problems with our domain controllers, I don't know if it was related.

    Monday Veeam backup by using a domain account to access VCenter has stopped working. Authentication failure. Try to connect to VCenter WebClient with SSO that weI made for years also failed. Signature as root for web client has as well.

    Signature to the C++ client worked for connections without any problem, but really limited what we can do. So I spare the domain and attempted to join without success.

    I can sign into the web client with [email protected], you try to join the domain as we did before the results in "Idm client exception: error trying to join AD, code error [31], user..." " - no reference to error 31 anywhere. Yes the username in the form of [email protected]. The computer account has been recreated on the field. Connectivity to the domain controller is fine, because if I put the password wrongly, it tells me that authentication has failed. All services on the VCSA are started with the exception of the function Auto-déployer.

    I tried via SSH connected as long as root (it tells me that [email protected] has no shell access) domaine.net/opt/likewise/bin/domainjoin-cli join [email protected] translated by ERROR_GEN_FAILURE [code 0x0000001f], yet once a mistake that relevant results.

    I am unable to create beams journal via the web client or via the C++ client, I suspect because space on the VCSA which I was not able to solve. Execution of the VSAN performance monitoring seem to chew place until I turned it off, but haven't found all the resources online as to where to find them or how to remove.

    I have a snapshot that was done before I got updated to 6u1 8 days ago, but I'm afraid that everything I have done since then will crumble. This VCenter manages a VSAN production, and I can't get him off.

    Please can someone untangle me this mess? With the lack of informative error messages I don't know where to start!

    Thank you

    B

    Woohoo! I finally thought to it.

    To start with I've implemented a new VCenter server as a trial, nothing configured, just deploy the iso 6u1. I found that it was not automatically joined to the domain and has attempted to do. SAME ERROR! So the problem is not with VSphere. In recent weeks, we introduced two new DCs R2 2012 and retired from one of our 2008 R2 domain controllers. I closed the DCs 2012 and tried again with only the old DC on the network. It worked! I was able to join the VCSA test to the field, and after a reboot because the button leave available domain.

    So I she disjoint and then attempted to join the domain when running wireshark on 2008R2 domain controller's NETWORK card. Then, I grew up a DC 2012R2, waited 10 minutes or so close the 2008R2. Yet once, I ran wireshark but this time on the 2012R2 server's NETWORK card. I compare the results of a successful or not join and I saw that the 2012R2 DC has been a lack of outgoing SMB packets to the VCSA. The Server service is running on the domain controller in 2012, but the Microsoft recommendation has been to change startup srv.sys from automatic to manual on 2012 R2 server. I thought it was odd at the time, but we have changed when we put in place the new domain controllers to meet the BPA. I compared it to the registry setting on the 2008R2 domain controller. which has been set to automatic startup.

    So to allow VCSA to join the domain when you get the error 31, cancel it

    http://social.technet.Microsoft.com/wiki/contents/articles/21104.SRV-sys-should-be-set-to-start-on-demand.aspx

    on your server 2012R2 DCs if it has been applied it causes domain join failure.

    Command prompt: sc config srv = auto start

    or

    Register: HKLM:\System\CurrentControlSet\Services\srv\ from 3 to 2

    I hope this saves someone else the time it took me to understand! I guess I can cancel my request for support now...

  • To join again

    Hello Adobe

    Ok... I am a teacher. I subscribe to Photoshop and I pay 3-4 months while using it. I stop paying and the use for, say, 3-4 months, then I see my 'mistake' :-) and I decide I want to 'join', can access and pay again. Montlhy. Same user name and so on.  Is - this possbile?

    There is no plan of a month at a discount available for teachers and students.  You need to either get the student-to-teacher plans offered or pay more than the normal speed for the plan from month to month.

    Creative cloud plans

    https://creative.Adobe.com/plans

  • possibility of joining Adobe outside service hours? E-mail?

    I am a single user, but I just realized that I am in charge of two accounts! Then I checked my credit card account and I also paid for two accounts! CAN´t join the hotline now... Help!

    We are sorry for double charges, there were two active subscriptions placed on the same day for the same product. I understand that it might be a mistake.

    I refunded all the charges of the purchase of the second since purchase in December 2014. You will not be charged for the CC second.

    Concerning

    Baudier

  • Outer join problem? test code included

    Hi all

    I have three tables:
    Master: It's the program_codes, titles and the active indicator.
    Main: Is the 'information sections"on a specific program.
    ModeOfS: He intones the sections of main program (abstract e.t.c) full-time part-time (PT) or (FT).

    They have all of the effective dates so when he ran during a given year knows whose registration was effective on this year here.
    When I run for 2003 I get 4 records which is correct, but when I run for 2002, I have only 2 folders. There is no valid records in the 'ModeOfS' table, but there are three records in the table of the 'hand' that are valid. But missing registration of P1 of the table of the 'hand '.

    I have external-joined the main table so I don't see why it doesn't show up. Any help would be great.

    Basically, program information may be considered at the level of "ModeOfS" but should not be, it's that his different text. So if it does and it is in the selected year then I want to see it. The limits of two YEARS will always be the same thing that this query will run for one YEAR

    Hello

    oraCraft wrote:
    Hi all

    I have three tables:
    Master: It's the program_codes, titles and the active indicator.
    Main: Is the 'information sections"on a specific program.
    ModeOfS: He intones the sections of main program (abstract e.t.c) full-time part-time (PT) or (FT).

    They have all application dates

    I'm confused. In the sample data you posted, it seems that only 2 tables have dates of application. Did you post erroneous data, at least for the master by mistake?

    so when he ran during a given year knows whose registration was effective on this year here.
    When I run for 2003 I get 4 records which is correct, but when I run for 2002, I have only 2 folders. There is no valid records in the 'ModeOfS' table, but there are three records in the table of the 'hand' that are valid. But missing registration of P1 of the table of the 'hand '.

    What are the correct results for 2002? They are:

    PROG TITLE         A ID PROG TERM_EFF   SECTION      TEXT               FK MO TERM_EFF   SECTION  TEXT
    ---- ------------- - -- ---- ---------- ------------ ----------------------- -- -- ---------- -------- -------------------
    0862 Mechanics     Y P1 0862       2000 ABSTRACT     This is Data
    0862 Mechanics     Y P2 0862       2000 OBJECTIVE    This is Data
    0862 Mechanics     Y P3 0862       2000 PREREQUISITE This is Data
    

    I have external-joined the main table so I don't see why it doesn't show up. ...

    One of the conditions involving modeofs is an outer join:

    ...  and main.ID = modeOfS.FK_ID(+)
    

    but the other is not:

    ...   and nvl(modeofs.TERM_EFF, 9999) = ( select nvl(max(m2.TERM_EFF), 9999)
    from modeofs m2
    where m2.TERM_EFF     <= 2003
    and m2.SECTION       = modeofs.SECTION
    and m2.MODE_OF_STUDY = modeofs.MODE_OF_STUDY)                           
    

    When you use the old notation to join, if no table of x is always marked with a + sign (as in condition 1 above), then all the conditions involving the x table must have a + sign, otherwise the effect will be an inner join. If you find this confusing, you're not alone. It is one of the reasons why I prefer the ANSI join rating:

    with     ranked_main     as
    (
         select     main.*
         ,     rank () over ( partition by  SECTION
                               order by          TERM_EFF     desc     nulls last
                        )           as MAIN_RANK
         from     main
         where     TERM_EFF     <= :target_year
         or     TERM_EFF     is null
    )
    ,     ranked_modeofs     AS
    (
         SELECT     modeofs.*
         ,     rank () over ( partition by  SECTION
                               ,          MODE_OF_STUDY
                               order by          TERM_EFF     desc     nulls last
                        )           as MODEOFS_RANK
         FROM     modeofs
         WHERE     TERM_EFF     <= :target_year
         OR     TERM_EFF     is null
    )
    select      master.*
    ,       ranked_main.*
    ,       ranked_modeOfS.*
    from           master
    join            ranked_main          on   ranked_main.PROGRAM_CODE     = master.PROGRAM_CODE
                           and     ranked_main.MAIN_RANK              = 1
    left outer join  ranked_modeOfS        on     ranked_modeofs.FK_ID          = ranked_main.ID
                                    and     ranked_modeofs.MODEOFS_RANK        = 1
    ;
    
  • Outer join issues

    Hi guys,.

    I use Oracle 10 G database. When I run the query below, I am of course a mistake given that an outer join more then one table:
    ---------------------
    SELECT
      MV_VAA_INC_MONTHLY_SUMMARY.Month_ID,
      MV_VAA_INC_MONTHLY_SUMMARY.PRIORITY,
      sum(MV_VAA_INC_MONTHLY_SUMMARY.CLOSED),
      decode(MV_VAA_INC_MONTHLY_SUMMARY.SLA_MET, 1, 0, 1),
      MV_VAA_INC_MONTHLY_SUMMARY.INCIDENT_NUMBER,
      to_char(MV_VAA_INC_MONTHLY_SUMMARY.FIRST_DAY_OF_THE_MONTH, 'Mon')||' '||to_char(MV_VAA_INC_MONTHLY_SUMMARY.FIRST_DAY_OF_THE_MONTH, 'yy'),
      INC_BREACH_SLA_DETAILS.RESPONSIBILITY
    FROM
      MV_VAA_INC_MONTHLY_SUMMARY , HPD_HELP_DESK,
       INC_BREACH_SLA_DETAILS,
       MIS_QUEUES_RESP  INC_MIS_QUEUES_RESP  
    WHERE
      (
       ( INC_MIS_QUEUES_RESP.RESP = ANY ('TCS', 'NONTCS')  )
       AND
       ( ( MV_VAA_INC_MONTHLY_SUMMARY.FIRST_DAY_OF_THE_MONTH ) BETWEEN ( add_months(trunc(sysdate,'MM'), -4) ) AND ( trunc(sysdate,'MM') -1 )  )
       AND
       MV_VAA_INC_MONTHLY_SUMMARY.Month_ID = 201110
       AND
       MV_VAA_INC_MONTHLY_SUMMARY.INCIDENT_NUMBER (+) = HPD_HELP_DESK.INCIDENT_NUMBER
       AND
       INC_BREACH_SLA_DETAILS.INCIDENT_NUMBER=HPD_HELP_DESK.INCIDENT_NUMBER (+)
       AND 
       INC_MIS_QUEUES_RESP.SUPPORT_GROUP_ID=HPD_HELP_DESK.ASSIGNED_GROUP_ID (+)
      )
    GROUP BY
      MV_VAA_INC_MONTHLY_SUMMARY.Month_ID, 
      MV_VAA_INC_MONTHLY_SUMMARY.PRIORITY, 
      decode(MV_VAA_INC_MONTHLY_SUMMARY.SLA_MET, 1, 0, 1), 
      MV_VAA_INC_MONTHLY_SUMMARY.INCIDENT_NUMBER, 
      to_char(MV_VAA_INC_MONTHLY_SUMMARY.FIRST_DAY_OF_THE_MONTH, 'Mon')||' '||to_char(MV_VAA_INC_MONTHLY_SUMMARY.FIRST_DAY_OF_THE_MONTH, 'yy'), 
      INC_BREACH_SLA_DETAILS.RESPONSIBILITY
    HAVING
      sum(MV_VAA_INC_MONTHLY_SUMMARY.CLOSED)  =  1
    ---------------------

    But when I run the sub query quite similar, I do not receive an error.

    -------------------------
    SELECT
      MV_VAA_INC_MONTHLY_SUMMARY.Month_ID,
      MV_VAA_INC_MONTHLY_SUMMARY.PRIORITY,
      sum(MV_VAA_INC_MONTHLY_SUMMARY.CLOSED),
      decode(MV_VAA_INC_MONTHLY_SUMMARY.SLA_MET, 1, 0, 1),
      MV_VAA_INC_MONTHLY_SUMMARY.INCIDENT_NUMBER,
      to_char(MV_VAA_INC_MONTHLY_SUMMARY.FIRST_DAY_OF_THE_MONTH, 'Mon')||' '||to_char(MV_VAA_INC_MONTHLY_SUMMARY.FIRST_DAY_OF_THE_MONTH, 'yy'),
      INC_BREACH_SLA_DETAILS.RESPONSIBILITY
    FROM
      MV_VAA_INC_MONTHLY_SUMMARY RIGHT OUTER JOIN HPD_HELP_DESK ON (MV_VAA_INC_MONTHLY_SUMMARY.INCIDENT_NUMBER=HPD_HELP_DESK.INCIDENT_NUMBER)
       LEFT OUTER JOIN INC_BREACH_SLA_DETAILS ON (INC_BREACH_SLA_DETAILS.INCIDENT_NUMBER=HPD_HELP_DESK.INCIDENT_NUMBER)
       LEFT OUTER JOIN MIS_QUEUES_RESP  INC_MIS_QUEUES_RESP ON (INC_MIS_QUEUES_RESP.SUPPORT_GROUP_ID=HPD_HELP_DESK.ASSIGNED_GROUP_ID)  
    WHERE
      (
       ( INC_MIS_QUEUES_RESP.RESP = ANY ('TCS', 'NONTCS')  )
       AND
       ( ( MV_VAA_INC_MONTHLY_SUMMARY.FIRST_DAY_OF_THE_MONTH ) BETWEEN ( add_months(trunc(sysdate,'MM'), -4) ) AND ( trunc(sysdate,'MM') -1 )  )
       AND
       INC_BREACH_SLA_DETAILS.RESPONSIBILITY  NOT IN  ( 'NONE'  )
       AND 
       MV_VAA_INC_MONTHLY_SUMMARY.Month_ID = 201110
      )
    GROUP BY
      MV_VAA_INC_MONTHLY_SUMMARY.Month_ID, 
      MV_VAA_INC_MONTHLY_SUMMARY.PRIORITY, 
      decode(MV_VAA_INC_MONTHLY_SUMMARY.SLA_MET, 1, 0, 1), 
      MV_VAA_INC_MONTHLY_SUMMARY.INCIDENT_NUMBER, 
      to_char(MV_VAA_INC_MONTHLY_SUMMARY.FIRST_DAY_OF_THE_MONTH, 'Mon')||' '||to_char(MV_VAA_INC_MONTHLY_SUMMARY.FIRST_DAY_OF_THE_MONTH, 'yy'), 
      INC_BREACH_SLA_DETAILS.RESPONSIBILITY
    HAVING
      sum(MV_VAA_INC_MONTHLY_SUMMARY.CLOSED)  =  1
    -------------------------

    Please can you advise the reason.

    See you soon,.
    Khadi

    Published by: BluShadow on November 11, 2011 10:54
    addition of {noformat}
    {noformat} tags. Please read {message:id=9360002} and learn to do this yourself.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Hi, yaya,

    888121 wrote:
    Hi guys,.

    In fact I'm not guru in Oracle as such. The first query, I pasted works well.

    You mean the second query (one with ANSI joins) is running fine and the first query (with signs +) is a mistake, right?

    Looking at this request I created the joins in the second, but then I get this error. I just want to understand what is the difference in the ANSI query and mine is throwing this error.

    Join ANSI rating supports outer joins to more than one table; the old syntax doesn't work. That's all there is to it. The ANSI syntax also supports FULL OUTER JOIN, and the old syntax does not work. There is nothing wrong with more than one table outer join, just as there is nothing wrong with a full outer join. You can do it with the old syntax, but just more coding.

    Published by: Frank Kulash, November 11, 2011 08:16

  • problem with join of two tables

    Hi, consider the following data
    WITH data AS
    (
      SELECT 123 cid, 'aaa' isi, 'kkk' sud, 'ttt' ri FROM dual UNION ALL 
      SELECT 222 cid, 'bbb' isi, 'gggg' sud, 'hhh' ri FROM dual
    
    ) ,
    data2 AS 
    (
      SELECT 'aaa' isi, 'yyy' sud, 'ooo' ri FROM dual UNION ALL 
      SELECT 'qqq' isi, 'ggg' sud, 'ooo' ri FROM dual UNION ALL 
      SELECT 'uuu' isi, 'ppp' sud, 'ttt' ri FROM dual UNION ALL
       SELECT 'ppp' isi, 'mmm' sud, 'nnn' ri FROM dual 
    
    
    )
    what I want to do, is to join data2 with data by isi, ri or southern id table and produce this output.
     cid  txt
     ===  ====
     123  aaa
     222  ggg
     123  ttt
    It's how I got the above output:
    first try to join isi in database2 with isi in "features" and discover if line matches. If this is the case, display the cid of the data table and the use of the value to match.
    e.g. in the first line of table data2, we can see that isi = aaa matches line an isi data table. If the output displays 123 and value aaa.

    If the rank table two of the Data2 isi = qqq. When join them with the data table, we find not all isi with qqq. in this case, it must join with column of South. We can see that South = ggg data2 games
    the second line in the table of output so will bee 222 and value ggg.

    now, take a look at the third row in Database2. ISI = uuu is not found in the data table when join them. then try to join to the South. South = ttt is also not found in any row of the data table. so join with ri. We
    can see that ri = ttt data2 matches with ri = ttt in the table of data online 1. Therefore, we display the value.

    can someone help me write a sql query that joins these two tables by isi. If no line found then join South, if no found rows then join in ri? Thank you

    Hello

    elmasduro wrote:
    Hi Frank, data2.sud = 'Gay' (4 characters) assume to be South = "ggg". by mistake, I type extra g.

    I have another question about the request. What happens if I want to bring rows of data.2 even if they do not exist in the data table for the entire column was join?
    for example, I want to show this:

    cid  txt
    ===  ====
    123  aaa
    222  ggg
    123  ttt
    ppp  --row from data2
    

    the columns of the last row of data.2 does not match any column in the data table. in this case, I want to make but cid will be null. I tried outer join on your request, but it looks like I can not clause or with outer join

    SELECT     d1.cid
    ,     CASE
              WHEN  d1.isi = d2.isi  THEN  d2.isi
              WHEN  d1.sud = d2.sud  THEN  d2.sud
                                            ELSE  d2.ri
         END     AS txt
    FROM data     d1
    JOIN     data2     d2  ON     d1.is(+)i     = d2.isi
                  OR     d1.sud(+)     = d2.sud
                  OR     d1.ri(+)     = d2.ri
    ;
    

    How can I re - write the query for this case? Thanks again for your help

    Here is the outer join syntax:

    SELECT     d1.cid
    ,     CASE
              WHEN  d1.isi = d2.isi  THEN  d2.isi
              WHEN  d1.sud = d2.sud  THEN  d2.sud
              WHEN  d1.ri  = d2.ri   THEN  d2.ri
                                            ELSE  d2.isi
         END     AS txt
    FROM          data2     d2
    LEFT OUTER JOIN     data     d1  ON     d1.isi     = d2.isi
                           OR     d1.sud     = d2.sud
                           OR     d1.ri     = d2.ri
    ;
    

    The + sign for outer joins only works with the old join syntax, non-ANSI. Do not try to mix the two different ways to do joins.

    Not to mention that the outer join, don't forget to change the CASE expression, to include the new possibility of any columns 3 join matching.

  • Aargh. "sql not correctly completed comand" - something wrong with my join...

    Select *.
    FROM table1 t1
    Join table2 t2 on t1.pkid = t2.pkid

    These aren't my real table names, but this structure is sufficient to generate my mistake. Clearly I can't join syntax. After Google search, I tried various permutations, with the join condition in parens, prefacing the names table with the schema and stuff like that. No change - always get ora00933.

    The only thing that worked was comma-ing, the tables and put the join condition in a where clause clause. Who doesn't for me in the end because the full query I need joined much more and it'll look terrible like that.

    Little help on just a simple inner join?

    Thank you!

    Edited by: sherifffruitfly January 4, 2011 10:18

    The ANSI join syntax was introduced in Oracle in version 9.1. Your version has been out of favor for a dozen years, and is the latest version of Oracle 11.2.

    Unless you can move to something of this century, to do joins in the where clause.

    John

Maybe you are looking for