Using delete in SQL Joins

What is wrong in this query am getting incorrect syntax near ','.error.I am using sql server 2014
DELETE ab, b
FROM Authors AS a INNER JOIN AuthorArticle AS ab ON a.AuthID=ab.AuthID
INNER JOIN Articles AS b ON ab.ArticleID=b.ArticleID
WHERE AuthorLastName='Tom';

What is wrong in this query am getting incorrect syntax near ','.error.I am using sql server 2014
DELETE ab, b
FROM Authors AS a INNER JOIN AuthorArticle AS ab ON a.AuthID=ab.AuthID
INNER JOIN Articles AS b ON ab.ArticleID=b.ArticleID
WHERE AuthorLastName='Tom';
 you cannot delete multiple table rows using a single delete command... you need either separate delete commands - each for one table  or better go with foreign key set up and on delete cascade.
refer : http://blog.sqlauthority.com/2012/09/27/sql-server-not-possible-delete-from-multiple-table-update-multiple-table-in-single-statement/
Hope it Helps!!

Similar Messages

  • SQL - JOIN using UNION ?? UNION using JOIN ?? with example!

    I was asked this question during one of my interviews. Can you do JOIN using UNION keyword? Can you do UNION using JOIN keyword?
    That is -
    1. I should get same output as JOIN without using JOIN keyword, but using UNION Keyword?
    2. I should get same output as UNION without using UNION keyword, but using JOIN Keyword?
    Can you give me an example of how to do this if possible?

    Hi,
    Welcome to the forum!
    user13067794 wrote:
    I was asked this question during one of my interviews. Can you do JOIN using UNION keyword? Can you do UNION using JOIN keyword?The correct answer to those questions is: Why would you want to? All versions of Oracle (and probably any other database product) provide JOIN to do certain things and UNION to do other things. Why not use those features the way they were designed to be used? Even if it is possible to do what you ask, it's going to be more complicated and less efficient.
    If you really must:
    That is -
    1. I should get same output as JOIN without using JOIN keyword, but using UNION Keyword? You can select the relevant columns from each table, and NULLs for all the columns from other tables, in a UNION query. Then you can use GROUP BY or analytic functions to combine data from different rows. For example, this JOIN:
    SELECT     d.dname
    ,     e.mgr
    FROM     scott.dept     d
    JOIN     scott.emp     e  ON     d.deptno  = e.deptno
    ;could be written using UNION, but no JOIN, like this:
    WITH     union_data     AS
         SELECT     deptno
         ,     dname
         ,     NULL     AS empno
         ,     NULL     AS mgr
         FROM     scott.dept
        UNION ALL
         SELECT     deptno
         ,     NULL     AS dname
         ,     empno
         ,     mgr
         FROM     scott.emp
    ,     quasi_join     AS
         SELECT     MAX (dname) OVER (PARTITION BY deptno)     AS dname
         ,     mgr
         ,     empno
         FROM     union_data
    SELECT     dname
    ,     mgr
    FROM     quasi_join
    WHERE     empno     IS NOT NULL
    ;Depending on your tables and your requirements, you might be able to do something a little simpler.
    2. I should get same output as UNION without using UNION keyword, but using JOIN Keyword?A FULL OUTER JOIN is similar to UNION.
    This UNION query:
    SELECT     dname          AS txt
    FROM     scott.dept
    UNION
    SELECT     TO_CHAR (mgr)     AS txt
    FROM     scott.emp
    ;Can be written like this, using JOIN but no UNION:
    SELECT DISTINCT
         NVL2 ( e.empno
              , TO_CHAR (e.mgr)
              , d.dname
              )          AS txt
    FROM          scott.dept     d
    FULL OUTER JOIN     scott.emp     e  ON       1 = 2
    user13067794 wrote:I too don't any example as such, but I am thinking on this line -
    Select a.x, b.y
    from a,b
    where a.key=b.key and sal<5000
    UNION
    Select a.x, b.y
    From a,b
    Where a.key=b.key and sal>7000
    can we get same result using JOIN?That's a very special case. You can get the same results without using UNION like this:
    Select distinct
         a.x
    ,      b.y
    from      a
    ,     b
    where      a.key     = b.key
    and      (        sal < 5000
         OR     sal > 7000
    Can we do something similar using UNION without using JOIN keyword??What you posted does not use the JOIN keyword.
    To get the same results without using a join (either with or without the JOIN keyword), you can use UNION together with aggregate or analytic functions, as I showed earlier.
    Edited by: Frank Kulash on Jul 5, 2011 9:01 PM

  • EXEC SQL join in ABAP program

    Hi All,
    I am using EXEC SQL join in my ABAP report,but it is giving dump.could you please correct my following code?
    START-OF-SELECTION.
      CONCATENATE '%' pa_match '%' INTO tp_match.
      EXEC SQL.
        OPEN dbcur FOR
        SELECT  kunnr,name1, banks
               FROM  kna1 as a inner join
               knbk as b
               on akunnr = bkunnr
               WHERE a.kunnr = b.kunnr and
               upper(a~name1) LIKE :tp_match
      ENDEXEC.
      DO.
        EXEC SQL.
          FETCH NEXT dbcur INTO :wa_name1
        ENDEXEC.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        APPEND wa_name1 TO ta_name1.
        COLLECT wa_name1 INTO ta_name1.
      ENDDO.
      EXEC SQL.
        CLOSE dbcur
      ENDEXEC.

    Remove the 'As' from the statement
    EXEC SQL.
      OPEN dbcur FOR
      SELECT kunnr,name1, banks
      FROM kna1 a inner join        "Delete 'AS' here
      knbk b
      on a~kunnr = b~kunnr
      WHERE a.kunnr = b.kunnr and
      upper(a~name1) LIKE :tp_match
    ENDEXEC.

  • How to get a form field valud in delete PL/SQL Button Event Handler

    Hi Friend,
    I have a form. when user clicks delete button. we want to remove system dodelete function
    and add a delete script
    Under delete-top category,
    how can I get value of form EVENT_NUMBER field in form at delete PL/SQL Button Event Handler?
    DELETE FROM PTEAPP.PTE_EVENTS WHERE eventnumber = EVENT_number
    But when I try to save this form and get message as
    1721/15 PLS-00201: identifier 'EVENT_NUMBER' must be declared
    Thanks for any help!
    newuser

    I did something similar but wasn't using a stored procedure. Couldn't you set a flag variable once you know you're not doing the insert and in the "before displaying the form" section put an IF to check if your flag was set, and if so do an HTP.Print('You are overpaid buddy!');
    Then just reset your flag.

  • Use a manual SQL query in an interface

    Hello,
    I would like to know if I can use a manual SQL query in an interface.
    Here is what I need.
    I have two tables.
    T1 with 4 fields :
    idT1, LibC, val, lib_val
    An example of a line from T1
    1, field1, 33 , value 33
    2, field2, 44 , value 44
    And table T2 with fields such as:
    idT2, ... , field1, field2
    There is no key to join T1 and T1, but I should retrieve the value of field lin_val from T2 which corresponds to the value of field1.
    In SQL, the query looks like this:
    SELECT t2.lib_val
    FROM t2 , t1
    WHERE T2.LibC = "Column_name"
    AND T2.val = T1.Column_name
    AND t1.idT1 = xyz

    You should go for yellow interface.It will solve your problem. Here you go
    http://odiexperts.com/how-to-create-a-temp-table-in-odi-interface/
    https://blogs.oracle.com/warehousebuilder/entry/odi_11g_simple_flexible_powerful
    Thanks.

  • Using Parameters in SQL-Query not only in where clauses

    Hi,
    I try to use Publisher parameters in the SQL Query from a Data Set.
    All of them have default values.
    So far, this is no problem, unless I try to use such a parameter value as an ordinary attribute value:
    >
    select
         case when (:pv_Group = 'no') then "DM15D_BETRIEBSTEIL"."BETR_TEIL"
                                            else :pv_some_Text end                                                                  as Betr_Teil,
         case when (:pv_Group = 'no') then "DM15D_BETRIEBSTEIL"."SUVA_NR_FORM"
                                            else :pv_some_Text end                                                        as Suva_Nr,
         case when (:pv_Group = 'no') then "DM15K_RIS_FAKTEN_PRO_BTT_JHR"."RIS_VOLLBESCH"
                                            else sum("DM15K_RIS_FAKTEN_PRO_BTT_JHR"."RIS_VOLLBESCH") end      as Vollbesch
    from "GDWH05"
    where
         "DM15D_BETRIEBSTEIL"."SUVA_NR_FORM" in (:pv_nim100)
         fetch first 65001 rows ONLY
    >
    The parameters 'pv_Group' and 'pv_nim100' are working fine. (when or where clauses)
    The parameter 'pv_some_Text' unfortunately not. (simple literals)
    When I try to validate the above SQL, I get the following Error:
    <font color="red">
    java.io.IOException: prepare query failed[nQSError: 43113] Message returned from OBIS. [nQSError: 46033] Datatype: 25 is not supported.
    </font>
    After use a cast function:
    >
    else CAST(:pv_some_Text AS CHARACTER)
    >
    I get this ERROR:
    <font color="red">
    java.io.IOException: prepare query failed[nQSError: 43113] Message returned from OBIS. [nQSError: 19002] Incorrect use of parameters. The parameters used in CAST cannot be resolved without ambiguity.
    </font>
    We use OBIEE 11.1.1.6.4 on a Win64-System.
    Thank's for any help.

    Hi Alex,
    let's leave away any unnecessary details.
    This is the SQL, inserted in the window 'Edit Data Set' of BIP Data Model:
    >
    select
         '--1'     as Betr_Teil,
         '--2'      as Suva_Nr,
         sum("GDWH05"."DM15K_RIS_FAKTEN_PRO_BTT_JHR"."RIS_VOLLBESCH") as Vollbesch
    from "GDWH05"
    where
         "DM15D_BETRIEBSTEIL"."SUVA_NR_FORM" in ('122-4.4')
         fetch first 65001 rows ONLY
    >
    Everything is fine when I click OK, the script goes back to the metadata.
    Let's try this script with bind values in ORACLE SQL Developer.
    This SQL is the physical part, found in the OBIEE-Log (Log level 5), except the bind values. Therefore we find, in the where clause, the join. In the logical sql, we don't have to join, because it's handled in the Common Enterprise Information Model (CEIM)
    >
    with
    sawith0 as
    select
    sum(t39617.ris_vollbesch) as c1
    from
    dm15d_betriebsteil t39455,
    dm15k_ris_fakten_pro_btt_jhr t39617
    where
    t39455.id_betriebsteil = t39617.id_betriebsteil
    and t39455.suva_nr_form = '122-4.4'
    select
    d1.c1 as c1,
    d1.c2 as c2,
    d1.c3 as c3
    from
    select
    :pv_some_text as c1,
    :pv_some_text as c2,
    sum(d1.c1) as c3
    from
    sawith0 d1
    d1
    where
    rownum <= 65001
    >
    This SQL works fine, even with bind values for 'pv_some_text'.
    But, when using the following SQL in the BIP Data Model:
    >
    select
         :pv_Text as Betr_Teil,
         :pv_Text as Suva_Nr,
         sum("GDWH05"."DM15K_RIS_FAKTEN_PRO_BTT_JHR"."RIS_VOLLBESCH") as Vollbesch
    from "GDWH05"
    where
         "DM15D_BETRIEBSTEIL"."SUVA_NR_FORM" in ('122-4.4')
         fetch first 65001 rows ONLY
    >
    The following ERROR occurs:
    <font color="red">java.io.IOException: prepare query failed[nQSError: 43113] Message returned from OBIS. [nQSError: 46008] Internal error: File server\Query\Optimizer\ServiceInterfaceMgr\Utility\Src\SQOIUTypeVisitor.cpp, line 643.</font>
    In my opinion, either I use a wrong syntax, or BIP has a problem with parsing the script.
    Thank you for your most welcome help.

  • Can this be done using a single sql......

    Hi,
    I have a problem to solve an was just wondering if it was possible to do it using a single sql. It is not imperative that I use a single sql but would like to know if it were possible and if so how, else I would appreciate if I was guided in the general direction where I may be able to find a solution....
    1) Esstentially in this example an employee can have 3 types of managers 'A' 'B' or 'C'.
    2) the emplyee must have 1 and only 1 manager of type 'A' (it is imperative that an emp have a manager of type A)
    3) the employee can have multiple managers of Type B and C but it is possible that the emp does not have any manager of type B and C
    We need a report which compares all the type B managers of an employee to the type A manager of the same employee and if any one of the Type B manager is same as the type A manager then the report indicates 'Equal' else the report indicates 'Not Equal'. if there is no type B manager for the employee then the report should show is as 'Not Equal'.
    The same comparsion need to be done between type C and type A managers for the employee...
    here are the scripts you would require to create a dummy table with data
    ?SCRIPTS START?
    create table emp (empid number(3), mgrid number(3), mgr_type varchar2(1))
    insert into emp values (1,3,'A')
    insert into emp values (1,10,'B')
    insert into emp values (1,14,'C')
    insert into emp values (2,15,'A')
    insert into emp values (3,10,'A')
    insert into emp values (3,10,'B')
    insert into emp values (3,10,'C')
    insert into emp values (4,12,'A')
    insert into emp values (5,2,'A')
    insert into emp values (5,2,'B')
    insert into emp values (5,3,'B')
    insert into emp values (6,1,'A')
    insert into emp values (6,5,'C')
    select * from emp
    ?SCRIPTS-END?
    EMPID> MGRID> M
    1> 3> A
    1 > 10 > B
    1 > 14 > C
    2 > 15 > A
    3 > 10 > A
    3 > 10 >B
    3 > 10> C
    4 >12 > A
    4 > 12 > C
    5 > 2 > A
    5 >2 > B
    5 > 3> B
    6 > 1 > A
    6 > 5 > C
    6 > 7 > C
    Expected Report
    emp_id>     mgr_type_A>     mgr_type_B>     mgr_type_C
    1>>>     3>>>          Not Equal>>>     Not Equal
    2>>>     15>>>          Not Equal>>>     Not Equal
    3>>>     10>>>          Equal>>>          Equal
    4>>>     12>>>          Not Equal>>>     Equal
    5>>>     2>>>          Equal>>>          Not Equal
    6>>>     1>>>          Not Equal>>>     Not Equal
    at the end of the day the report is to be exported as an xls. I would be using java to connect to the DB and create the xls. Obv I could run a simple sql and do a lot of comparision in java and get the desired report... What I am looking for is
    - Is it possible using a single sql.
    - if not.. is it better to use a pl/sql procedure or do it using java code.
    the table has abt 100,000 records .... performance is not really a factor right now...
    I just have no idea where to look.. I thought of pivot tables but could not find a solution... thought of decode as well... but again to no avail... (i am not oracle expert by any means....)
    Appreciate any help I can get...
    Thanks...
    PS: Have used > to seperate the data.. since the preview of the post was truncating all spaces between the columns and was making it difficult to differetiate the data....
    ooooppppsss....just realised i should have put this in the PL/SQL forum.. dont' seem to find an option to delete the post.. so if someone can move it to the other forum... it would be great....
    Message was edited by:
    user520267

    Well, there are no moderators here, so you are going to have to get your answer here :-). Most of us that hang out in PL/SQL are here too.
    Assuming that 4>>> 12>>> Not Equal>>> Equal is a typo because there is only one record for empid 4, this works. There may be more efficient ways but ...
    SQL> SELECT a.empid, a.mgrid,
      2         NVL((SELECT 'EQUAL' FROM emp b
      3             WHERE b.empid = a.empid and
      4                   b.mgrid = a.mgrid and
      5                   b.mgr_type = 'B'), 'NOT EQUAL') bmgr,
      6         NVL((SELECT 'EQUAL' FROM emp c
      7             WHERE c.empid = a.empid and
      8                   c.mgrid = a.mgrid and
      9                   c.mgr_type = 'C'), 'NOT EQUAL') cmgr
    10  FROM emp a
    11  WHERE mgr_type = 'A';
         EMPID      MGRID BMGR      CMGR
             1          3 NOT EQUAL NOT EQUAL
             2         15 NOT EQUAL NOT EQUAL
             3         10 EQUAL     EQUAL
             4         12 NOT EQUAL NOT EQUAL
             5          2 EQUAL     NOT EQUAL
             6          1 NOT EQUAL NOT EQUALYou can format your code and data, as I did here, by using [ pre ] and [ /pre ] without the spaces around the text you want preserved. [ code ] and [ /code ] works too.
    HTH
    John

  • How to prevent Oracle from using an index when joining two tables ...

    How to prevent Oracle from using an index when joining two tables to get an inline view which is used in an update statement?
    O.K. I think I have to explain what I mean:
    When joining two tables which have many entries sometimes it es better not to use an index on the column used as join criteria.
    I have two tables: table A and table B.
    Table A has 4.000.000 entries and table B has 700.000 entries.
    I have a join of both tables with a numeric column as join criteria.
    There is an index on this column in table A.
    So I instead of
      where (A.col = B.col)I want to use
      where (A.col+0 = B.col)in order to prevent Oracle from using the index.
    When I use the join in a select statement it works.
    But when I use the join as inline view in an update statement I get the error ORA-01779.
    When I remove the "+0" the update statement works. (The column col is unique in table B).
    Any ideas why this happens?
    Thank you very much in advance for any help.
    Regards Hartmut

    I think you should post an properly formatted explain plan output using DBMS_XPLAN.DISPLAY including the "Predicate Information" section below the plan to provide more details regarding your query resp. update statement. Please use the \[code\] and \[code\] tags to enhance readability of the output provided:
    In SQL*Plus:
    SET LINESIZE 130
    EXPLAIN PLAN FOR <your statement>;
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);Usually if you're using the CBO (cost based optimizer) and have reasonable statistics gathered on the database objects used the optimizer should be able to determine if it is better to use the existing index or not.
    Things look different if you don't have statistics, you have outdated/wrong statistics or deliberately still use the RBO (rule based optimizer). In this case you would have to use other means to prevent the index usage, the most obvious would be the already mentioned NO_INDEX or FULL hint.
    But I strongly recommend to check in first place why the optimizer apparently seems to choose an inappropriate index access path.
    Regards,
    Randolf
    Oracle related stuff:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle:
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • SQL JOIN with BPM sql component

    Hello friends.
    How to use SQL JOIN with BPM sql component?
    The tables objects are created but the joined tables belong to different sql components .
    I tried something like that, but a error "table doesn't exist" occours.
    Ex:
    for each element in
    SELECT imuImovelCd
    FROM IMOVEIS_URBANOS,
    Integracao.FGLP.IMOVEIS_PRE_EDITAIS
    WHERE IMOVEIS_URBANOS.imuImovelCd = Integracao.FGLP.IMOVEIS_PRE_EDITAIS.ipeImuCd
    AND Integracao.FGLP.IMOVEIS_PRE_EDITAIS.ipePedNr = 1
    AND Integracao.FGLP.IMOVEIS_PRE_EDITAIS.ipePedAa = 2008
    do
    extend this.imoveis using cdImovel = element.imuimovelcd,
                                  nrImovel = call(DEC_ENDERECO, codimovel : element.imuimovelcd, tipoimovel : 1)
    end
    Edited by: user9008295 on 26/01/2010 05:19

    ok, ok you are right.
    When I try use SQL Statement to make a JOIN with 2 tables on different sql objects, BPM returns "table dosn't exists".
    So.... I change my code. I dont know if this is the best way to do, but... i hope u, or everyone, can help me to do a best work.
    This code works fine.
    for each element in
    SELECT ipeImuCd
         FROM Integracao.FGLP.IMOVEIS_PRE_EDITAIS
         WHERE Integracao.FGLP.IMOVEIS_PRE_EDITAIS.ipePedNr = 1
         AND Integracao.FGLP.IMOVEIS_PRE_EDITAIS.ipePedAa = 2008
    do
         for each element2 in
              SELECT imuImovelDv
              FROM IMOVEIS_URBANOS
              WHERE imuImovelCd = element.ipeImuCd
         do
              extend this.imoveis using cdDvImovel = String(element2.imuImovelDv),
                                            cdImovel = Decimal(element.ipeImuCd),
                                            endereco = call(DEC_ENDERECO, codimovel : element.ipeImuCd, tipoimovel : 1)
         end
    end
    Thx a lot!!!

  • How to use the generated SQL of "Recommendation"

    Dear Experts,
    I am using KXEN recommendation function. After trained the model, I expose the result in form of HANA SQL. However, I am really have no idea how to make this SQL runnable because there are some subqueries like:
    FROM $Dataset "SPACEIN"
      LEFT OUTER JOIN (SELECT * FROM  WHERE "GRAPH_NAME" = 'Transactions') "PRODUCTS" ON ("PRODUCTS"."KXNODEFIRST" = "SPACEIN".MemberID)
      LEFT OUTER JOIN (SELECT * FROM  WHERE "GRAPH_NAME" = 'Product') "RULES" ON ("PRODUCTS"."KXNODESECOND" = "RULES"."KXNODESECOND")
      LEFT OUTER JOIN (SELECT * FROM  WHERE "GRAPH_NAME" = 'Transactions') "NOTIN" ON ("RULES"."KXNODESECOND_2" = "NOTIN"."KXNODESECOND") AND ("NOTIN"."KXNODEFIRST" = "SPACEIN".MemberID)
    Please pay attention to the red parts. While $Dataset, I assume it should be the data source which is used to train the model, but how to handle the "GRAPH" parts(the next 3 subqueries)? There are something missing after "FROM" clause, what should I fill in here? why the XKEN will generate sucn incomplete codes?
    Thanks for your help!

    Hi Richard,
    To apply a recommendation model, you first need to save your model in your database. (saving the model in the database for such models and for what you want to do is mandatory).
    Once you saved it, you will see many tables starting with "Kx" : KxInfos, KxLinks, KxNodes...
    These tables contains information on the nodes available in the data used, on the links between products.
    Now, if you generate the SQL code for Hana, the name of your KxLinks table should now be used in the SQL code.
    When prompted for $Dataset and $Key, you should specify in place of $Dataset the name of the table on which you want to apply your model. In place of $Key, you should enter the name of the key of this table (e.g. UserId).
    In my case $Dataset =>KAR_UniqueCustomers and $Key=>UserID
    My generated code looks like this :
    FROM KAR_UniqueCustomers "SPACEIN"
    LEFT OUTER JOIN (SELECT * FROM KxLinks1 WHERE "GRAPH_NAME" = 'Transactions') "PRODUCTS" ON ("PRODUCTS"."KXNODEFIRST" = "SPACEIN".UserID)
    LEFT OUTER JOIN (SELECT * FROM KxLinks1 WHERE "GRAPH_NAME" = 'ItemPurchased') "RULES" ON ("PRODUCTS"."KXNODESECOND" = "RULES"."KXNODESECOND")
    Note that your application table must contain:
    - A column with the same name as your users identifier in the training dataset. It contains the list of distinct users (stricly 1 row for each customer id)
    - A column with the same name as your products name in the training dataset. It can contain the name of the same product for all customers.
    I hope you'll make it work !
    Armelle

  • SQL Joins & joining 4 tables help.

    Post Author: n8than1
    CA Forum: Data Connectivity and SQL
    Hello,  I'm trying to build a report to show orders shipped, and pull in costing information from my sales tables.  I have 4 tables I'm using data from, and I'm linking my shipping master and shipping items tables by a left outer join on shipper number.  I'm linking my sales master table and sales item table using a left outer join on sales order number.  Now I need to link the 4 tables together, and everything I try spits out duplicate line items. I'm linking my shipping master table to sales order master using a inner join on sales order number. here is a copy of my query: SELECT "sorels"."fmatlcost", "sorels"."fsetupcost", "sorels"."flabcost", "sorels"."fovhdcost", "sorels"."forderqty", "shmast"."fshipdate", "shitem"."fshipqty", "shitem"."fpartno", "somast"."fusercode", "shmast"."fcbcompany" FROM   (("<SQL Database>"."dbo"."somast" "somast" INNER JOIN "<SQL Database>"."dbo"."shmast" "shmast" ON "somast"."fsono"="shmast"."fcsono") LEFT OUTER JOIN "<SQL Database>"."dbo"."sorels" "sorels" ON "somast"."fsono"="sorels"."fsono") LEFT OUTER JOIN "<SQL Database>"."dbo"."shitem" "shitem" ON "shmast"."fshipno"="shitem"."fshipno" WHERE  ("shmast"."fshipdate">={ts '2007-11-01 00:00:00'} AND "shmast"."fshipdate"<{ts '2007-11-30 00:00:01'}) AND "shitem"."fpartno" NOT  LIKE 'PM%' ORDER BY "somast"."fusercode", "shmast"."fcbcompany"

    Post Author: GraemeG
    CA Forum: Data Connectivity and SQL
    At a glance, the problem seems to be primarily that you are not giving enopugh information to your joins to limit the data displayed. If you added an order and shipment line number to the joins this may help. Just for fun, can you put the table structures here and I'll give it a whirl? Alternatively, email me a sample from all four tables and I'll put something together and send it back. Use graemeg AT falum DOT co DOT nz.
    Cheers G

  • ANSI SQL JOIN

    Hi
    How to use ANSI SQL JOINS (9i) for below query
    SELECT EMP.EMPNO,EMP_T.TNO,EMP_T.SAL1 FROM EMP,EMP_T WHERE EMP.EMPNO=EMP_T.TNO
    UNION ALL
    SELECT EMP.EMPNO,EMP_T.TNO,EMP_T.SAL2 FROM EMP,EMP_T WHERE EMP.EMPNO=EMP_T.TNO
    UNION ALL
    SELECT EMP.EMPNO,EMP_T.TNO,EMP_T.SAL3 FROM EMP,EMP_T WHERE EMP.EMPNO=EMP_T.TNO
    EMPNO TNO SAL1
    7369 7369 100
    7499 7499 1000
    7566 7566 400
    7782 7782 4000
    7369 7369 200
    7499 7499 2000
    7566 7566 500
    7782 7782 5000
    7369 7369 300
    7499 7499 3000
    7566 7566 600
    EMPNO TNO SAL1
    7782 7782 6000
    Regards
    MM

    SELECT EMP.EMPNO,
           EMP_T.TNO,
           EMP_T.SAL1
    FROM   EMP
    JOIN   EMP_T ON ( EMP.EMPNO = EMP_T.TNO )
      UNION ALL
    SELECT EMP.EMPNO,
           EMP_T.TNO,
           EMP_T.SAL2
    FROM   EMP
    JOIN   EMP_T ON ( EMP.EMPNO = EMP_T.TNO )
      UNION ALL
    SELECT EMP.EMPNO,
           EMP_T.TNO,
           EMP_T.SAL3
    FROM   EMP
    JOIN   EMP_T ON ( EMP.EMPNO = EMP_T.TNO )

  • How can I edit imported audio track? After selecting and deleting region and joining remaining parts, it keeps playing the track with the deleted part! What am I doing wrong?

    How can I edit imported audio track? After selecting and deleting region, and joining remaining parts, it keeps playing the track with the deleted region!
    What am I doing wrong?

    After selecting and deleting region, and joining remaining parts, it keeps playing the track with the deleted region!
    What am I doing wrong?
    How exactly are you doing this?
    When I cut out a part of an audio region, then drag the remaining parts together, so they are touching, the track will skip the cut out section when playing the file.  Also, if I select the remaining parts of the region and use the command "Edit > join regions". This will create a new audio file with the cut out part deleted.
    You should see this prompt, when you are joining the regions:

  • OWB 10.2.0.4 ANSI SQL join problem

    Hi
    Its seams to me, that in OWB 10.2.0.4 there is something broken with ANSI SQL joins and instead of ANSI joins there is used oracle SQL joins only. Maybe someone can point some solutions? I can’t rewrite all mappings with union and other operators. And manually pl/sql editing also would be big problem.

    "Am I correct in assuming you did not code ANSI joins?" -> yes, i am coding Oracle SQL joins and with this option just generating ANSI joins.
    With ANSI SQL join you can use OR and IN operands (and code looks more readable).
    It is question of performance (so for example 80% of dataset you can join by one column other 15% by second etc ..). So this all can be rewritten also in Split->join->union all, but if you have several such joins, this will be painfully.

  • How to find listing of modules which has used xyz PL/SQL function?

    Hi,
    How I can find the list of forms/reports which has used xyz pl/sql function?
    I want to delete a pl/sql function but before that I would like to
    make sure this function is not being used by any forms/report.
    Thanks for your help!!
    D

    There are many tools available for finding out the particular string across many forms in one shot.
    One such utility is forms apimaster.
    You can download it's 30 days free trial from the internet.

Maybe you are looking for

  • Can we do a Secure FTP for an XML file from ABAP when firewall is enabled?

    Hi all, I have a requirement to send an XML file to an External FTP Server which is out of our corporate network and our firewall is enabled. I have to send an XML file with Purchase Order details. I completed that with the help of this blog https://

  • Profit center change on contract

    Hello all, I wuld like to change contract master data : profit centers are incorrect. But if invoicing has been made, it is impossible to change this value, even if invoice cancellation has been performed. What may I do ?

  • JVM core dump

    JVMs crushed on my three node weblogic8.1 cluster. Not always happen, and can be any of the nodes. I tries jdk141_05,jdk141_02 and jdk142_04. There wan't any difference. The os is solaris 5.8. Here is the output of uname -s: SunOS smpc3 5.8 Generic_1

  • Need Aperture help

    I am having a problem sending images to recently installed Photoshop 5.  If I export an image to my desktop, I can then open in PS with not problem.  The both work fine independently but not with each other.  I keep getting this error message. Editin

  • All type of FAQ's. pls replyyyyyyyy

    i have many questions . pls replyy.. 1>  how to make checkbox in grid ALV? 2>what we have to write in FIELD EXIT? (which is MUST) 3>wat is the t code to see the object which are in BOR? 4>  tell all the details steps of performance tuning? 5> differe