Error with this query?

SET HEADING OFF;
SELECT 'Song Name: ', S.TITLE
FROM SONG S
I don want to display heading in the result table. I need result like:
Song Name: Mungaru Male
Song Name: Titanic
Song Name: Milana
But the Statement "SET HEADING OFF;" results in a result

Hi,
SET HEA[DING] {ON | OFF}
Controls printing of column headings in reports.
SQL>  select NUM_ROWS from user_tables where table_name='TABLE_A';
  NUM_ROWS
      4999
SQL> set heading off
SQL>  select NUM_ROWS from user_tables where table_name='TABLE_A';
      4999
SQL> select 'song name :' as "song",t.num_rows from dual,( select NUM_ROWS from user_tables where table_name='TABLE
_A') t;
song name :       4999
it works
SQL>  select ' song name : ' || NUM_ROWS from user_tables where table_name='TABLE_A';
'SONGNAME:'||NUM_ROWS
song name : 4999
1 row selected.
SQL> set heading off
SQL>  select ' song name : ' || NUM_ROWS from user_tables where table_name='TABLE_A';
song name : 4999
1 row selected.- Pavan Kumar N
Edited by: Pavan Kumar on Nov 24, 2010 11:51 AM

Similar Messages

  • Whats wrong with this query.can anyone help me......

    select CASE WHEN TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'DDMMYYYY HH24:MM:SS'),13,2))>0 AND TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)) <14
    THEN TO_DATE(CONCAT(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)||'00',SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MI:SS'),16)||'00'),'DD-MM-YYYY HH24:MI:SS') end
    from table;
    i have written this query.whats wrong with this query..........
    the error is "literal does not match format string"
    Reegards soumen

    Why does your date_format loose, ununify and not fix ?
    And what is your exact requirement?
    >>
    CASE WHEN
    TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'DDMMYYYY HH24:MM:SS'),13,2))>0
    AND TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)) <14
    <<
    This is
    CASE WHEN TO_CHAR(START_TIME_TIMESTAMP,'MM') between '01' and '13'
    >>
    THEN TO_DATE(CONCAT(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)
    ||'00',
    SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MI:SS'),16)||'00'),
    'DD-MM-YYYY HH24:MI:SS')
    <<
    This is
    TO_DATE(
    TO_CHAR(START_TIME_TIMESTAMP,'MM"00"SS"00"),
    'DD-MM-YYYY HH24:MI:SS')
    Obviously, format is not matching !
    SQL> select to_char(sysdate,'MM"00"SS"00') from dual;
    TO_CHAR(
    06004900
    SQL> select to_date('06004900','DD-MM-YYYY HH24:MI:SS') from dual;
    select to_date('06004900','DD-MM-YYYY HH24:MI:SS') from dual
    ERROR at line 1:
    ORA-01861: literal does not match format string

  • I have received an error message when trying to install 13 new apps for Creative Cloud. It reads: "Error There was an error with this action. Try again later.  7b1f5f56-79b3-4a0d-8fd2-137b1a3e6b67" I don't know what to do.

    I have received an error message when trying to install 13 new apps for Creative Cloud. It reads: "Error There was an error with this action. Try again later.  7b1f5f56-79b3-4a0d-8fd2-137b1a3e6b67" I don't know what to do.

    AppTrial1 where are you seeing this error exactly?  For information on how to install the Adobe Creative applications included with the Creative Cloud please see Install and update apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html.

  • Problem with this query

    Hi
    We are using this query
    SELECT ...........
    FROM TRIP JOIN TRIPEXTENSION ON TRIPEXTENSION.TRIPID = TRIP.TRIPID JOIN FOREIGNRECLOC ON FOREIGNRECLOC.TRIPID = TRIP.TRIPID JOIN CUSTSEGCONTROL ON CUSTSEGCONTROL.TRIPID = TRIP.TRIPID JOIN CUSTOMERCONTROL ON CUSTOMERCONTROL.CUSTOMERID = CUSTSEGCONTROL.CUSTOMERID JOIN CUSTOMER ON CUSTOMER.CUSTOMERID = CUSTSEGCONTROL.CUSTOMERID LEFT JOIN TRIPSEGMENT ON TRIPSEGMENT.TRIPSEGMENTID = CUSTSEGCONTROL.TRIPSEGMENTID LEFT JOIN TRIPSEGMENTEXTENSION ON (TRIPSEGMENTEXTENSION.TRIPSEGMENTID = TRIPSEGMENT.TRIPSEGMENTID AND TRIPSEGMENTEXTENSION.TRIPID = TRIP.TRIPID) LEFT JOIN TICKET ON CUSTOMERCONTROL.TICKETID = TICKET.TICKETID WHERE FOREIGNRECLOC.TRIPID IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) AND ((TRIP.STATUS <> ? AND (CUSTSEGCONTROL.DELETEDITEM = 0 OR CUSTSEGCONTROL.DELETEDITEM is null )) OR (TRIP.STATUS = ?)) AND TRIPEXTENSION.EOTTIME = CUSTSEGCONTROL.EOTTIME AND TRIPEXTENSION.EOTTIME = CUSTOMERCONTROL.EOTTIME AND TRIPEXTENSION.EOTTIME = TRIP.EOTTIME
    It is taking long time to execute and causing timeout. The columns used in where clause are as follows
    FOREIGNRECLOC.TRIPID - PRIMARY KEY
    TRIP.STATUS - NO INDEX/CONTAINS LOW CARDINALITY DATA
    CUSTSEGCONTROL.DELETEDITEM - NO INDEX/CONTAINS LOW CARDINALITY DATA
    TRIPEXTENSION.EOTTIME/CUSTSEGCONTROL.EOTTIME/CUSTOMERCONTROL.EOTTIME/TRIPEXTENSION.EOTTIME - NO INDEX/CONTAINS HIGH CARDINALITY DATA
    Our 'experts' said something 'seriously' wrong with this query. Can anyone provide any suggestion/observation on this?
    thanks and regards,
    SUMIT

    Hi Devid
    Thans for your response. The result of explain plan is
    SQL> SELECT * FROM TABLE(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    | Id  | Operation                        | Name                      | Rows  | Bytes | Cost (%CPU)|
    |   0 | SELECT STATEMENT                 |                           |     1 |   592 |    51   (8)|
    |   1 |  TABLE ACCESS BY INDEX ROWID     | FOREIGNRECLOC             |     1 |    16 |     1   (0)|
    |   2 |   NESTED LOOPS                   |                           |     1 |   592 |    51   (8)|
    |   3 |    NESTED LOOPS                  |                           |     1 |   576 |    50   (8)|
    |   4 |     NESTED LOOPS                 |                           |     1 |   569 |    50   (8)|
    |   5 |      NESTED LOOPS                |                           |     1 |   511 |    49   (9)|
    |   6 |       HASH JOIN                  |                           |     1 |   397 |    42  (10)|
    |   7 |        HASH JOIN                 |                           |    11 |  3443 |    36   (9)|
    |   8 |         HASH JOIN                |                           |    13 |  3588 |    29   (7)|
    |   9 |          HASH JOIN               |                           |   327 | 51339 |    10  (10)|
    |  10 |           TABLE ACCESS FULL      | TRIP                      |   270 | 17820 |     3   (0)|
    |  11 |           HASH JOIN              |                           |   327 | 29757 |     7  (15)|
    |  12 |            TABLE ACCESS FULL     | TRIPSEGMENT               |   123 |  9225 |     3   (0)|
    |  13 |            TABLE ACCESS FULL     | TRIPSEGMENTEXTENSION      |   327 |  5232 |     3   (0)|
    |  14 |          TABLE ACCESS FULL       | CUSTSEGCONTROL            |  3180 |   369K|    19   (6)|
    |  15 |         TABLE ACCESS FULL        | CUSTOMERCONTROL           |  2658 | 98346 |     6   (0)|
    |  16 |        TABLE ACCESS FULL         | CUSTOMER                  |   464 | 38976 |     5   (0)|
    |  17 |       TABLE ACCESS BY INDEX ROWID| TRIPEXTENSION             |     1 |   114 |     7   (0)|
    |  18 |        INDEX RANGE SCAN          | EXTENSION_TRIPID_FK_INDEX |     7 |       |     1   (0)|
    |  19 |      TABLE ACCESS BY INDEX ROWID | TICKET                    |     1 |    58 |     1   (0)|
    |  20 |       INDEX UNIQUE SCAN          | SYS_C0011530              |     1 |       |     0   (0)|
    |  21 |     INDEX UNIQUE SCAN            | SYS_C0011533              |     1 |     7 |     0   (0)|
    |  22 |    INDEX RANGE SCAN              | TRIPSEGEXT_TRIPID_INDEX   |     1 |       |     0   (0)|
    Note
       - 'PLAN_TABLE' is old version
    32 rows selected.thanks and regars,
    SUMIT

  • Why there is a error in this query ?

    why there is a error in this query ?
    declare
    v_exist pls_integer;
    v_search varchar2(255) := '175';
    v_sql varchar2(255);
    begin
    for s in
    (select table_name, column_name
    from user_tab_columns
    where data_type like '%CHAR%'
    order by table_name, column_name)
    loop
    v_sql := 'select count(*) from '||s.table_name||
    ' where instr('||s.column_name||',' || CHR(39)|| v_search|| CHR(39) ||') > 0';
    execute immediate v_sql into v_exist;
    if v_exist > 0 then
    dbms_output.put_line(s.table_name||'.'||s.column_name||' matches the string.');
    end if;
    end loop;
    end;
    Error:
    The following error has occurred:
    ORA-00933: SQL command not properly ended
    ORA-06512: at line 14
    Edited by: user575089 on Dec 23, 2009 4:14 AM
    Edited by: user575089 on Dec 23, 2009 4:14 AM

    See, Right now i am in schema and see below :
    set serveroutput on;
    declare
    v_exist pls_integer;
    v_search varchar2(255) := 'SCOTT';
    v_sql varchar2(255);
    begin
    for s in
    (select '"'||table_name||'"' table_name,'"'||column_name||'"' column_name
    from user_tab_columns
    where data_type like '%CHAR%'
    and table_name not like '%$%'
    order by table_name, column_name)
    loop
    v_sql := 'select count(*) from '||s.table_name||' where instr('||s.column_name||',' || CHR(39)|| v_search|| CHR(39)||') > 0';
    --dbms_output.put_line(v_sql);
    --execute immediate v_sql;
    execute immediate v_sql into v_exist;
    if v_exist > 0 then
    dbms_output.put_line(s.table_name||'.'||s.column_name||' matches the string.');
    end if;
    end loop;
    end;
    "EMP"."ENAME" matches the string.
    "EXCEPTIONS"."OWNER" matches the string.
    "FLOW_TABLE"."OBJECT_OWNER" matches the string.
    "MYEMP"."ENAME" matches the string.
    PL/SQL procedure successfully completed.
    I am getting output; that i search "SCOTT" word in my search string.

  • I just got the following message fro Adobe when I try to update:  "Error There was an error with this action. Try again later.  3cde7ed8-ce06-45ae-8fa8-58cc80a9d1ec"

    I just got the following message fro Adobe when I try to update:  "Error There was an error with this action. Try again later.  3cde7ed8-ce06-45ae-8fa8-58cc80a9d1ec"

    Link for Download & Install & Setup & Activation problems may help
    -Online Chat http://www.adobe.com/support/download-install/supportinfo/

  • Sign in error 'There was an error with this action. Try again later.'

    Get an error message when trying to log into CC to download my initial apps.
    Purchased from Amazon and the process completed successfully until I attempted to log in and down load from adobe.com. had to create new adobe account just to post this question.
    The error message appears repeatedly 'There was an error with this action. Try again later.'
    The error message is followed by a series of 5 groups of numbers and letters with dashes between each group.
    Windows 7 rig. Attempted 3 different browsers. same error.. 'There was an error with this action. Try again later.'
    attempted fix posted by another forum member recommending the removal of a .db file in the appData folder. No .db file existed as described.
    Thank you for any suggestions.

    Adobe contact information - http://helpx.adobe.com/contact.html may help
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • HT5022 10.8.4 is throwing an error with this software: "Airport Utility cannot be installed on this disk. The version of Mac OS X on this volume is not supported"

    10.8.4 is throwing an error with this software: "Airport Utility cannot be installed on this disk. The version of Mac OS X on this volume is not supported"

    You are trying to install a version of Airport Utility earlier than 6.0, correct? If so see the following: Installing the Old AirPort Utility (Version 5.6) on Mountain Lion | frank.is.

  • Please need help with this query

    Hi !
    Please need help with this query:
    Needs to show (in cases of more than 1 loan offer) the latest create_date one time.
    Meaning, In cases the USER_ID, LOAN_ID, CREATE_DATE are the same need to show only the latest, Thanks!!!
    select distinct a.id,
    create_date,
    a.loanid,
    a.rate,
    a.pays,
    a.gracetime,
    a.emailtosend,
    d.first_name,
    d.last_name,
    a.user_id
    from CLAL_LOANCALC_DET a,
    loan_Calculator b,
    bv_user_profile c,
    bv_mr_user_profile d
    where b.loanid = a.loanid
    and c.NET_USER_NO = a.resp_id
    and d.user_id = c.user_id
    and a.is_partner is null
    and a.create_date between
    TO_DATE('6/3/2008 01:00:00', 'DD/MM/YY HH24:MI:SS') and
    TO_DATE('27/3/2008 23:59:00', 'DD/MM/YY HH24:MI:SS')
    order by a.create_date

    Perhaps something like this...
    select id, create_date, loanid, rate, pays, gracetime, emailtosend, first_name, last_name, user_id
    from (
          select distinct a.id,
                          create_date,
                          a.loanid,
                          a.rate,
                          a.pays,
                          a.gracetime,
                          a.emailtosend,
                          d.first_name,
                          d.last_name,
                          a.user_id,
                          max(create_date) over (partition by a.user_id, a.loadid) as max_create_date
          from CLAL_LOANCALC_DET a,
               loan_Calculator b,
               bv_user_profile c,
               bv_mr_user_profile d
          where b.loanid = a.loanid
          and   c.NET_USER_NO = a.resp_id
          and   d.user_id = c.user_id
          and   a.is_partner is null
          and   a.create_date between
                TO_DATE('6/3/2008 01:00:00', 'DD/MM/YY HH24:MI:SS') and
                TO_DATE('27/3/2008 23:59:00', 'DD/MM/YY HH24:MI:SS')
    where create_date = max_create_date
    order by create_date

  • Can any one help with this query please

    I have a table something as below
    Things_t
    Things Characteristic Char Value
    Item 1 Colour Red
    Item 1 Packaging
    Item 2 Shape Square
    Item 2 Brand Spunk
    Now i want to reterive an item with none of its char values as Null. Using the query “ select distinct things from things_t where char value is Null ” will fetch the item 1 also together with item 2. i want to fetch a record from thing for which none of the char values are Null such as Item 2. Can you please help me with this query.

    Try this:
    WITH t AS
    (SELECT 1 item_id, 17436 chr_id, 14225034 chr_val_id FROM dual UNION
    SELECT 1 item_id, 39 chr_id, 14276173 chr_val_id FROM dual UNION
    SELECT 1 item_id, 17774 chr_id, NULL chr_val_id FROM dual UNION
    SELECT 1 item_id, 265 chr_id, 20502978 chr_val_id FROM dual UNION
    SELECT 1 item_id, 16978 chr_id, 797233 chr_val_id FROM dual UNION
    SELECT 1 item_id, 13092 chr_id, 5666917 chr_val_id FROM dual UNION
    SELECT 1 item_id, 15228 chr_id, 1209758 chr_val_id FROM dual UNION
    SELECT 2 item_id, 112 chr_id,  12705342 chr_val_id FROM dual UNION
    SELECT 2 item_id, 6945 chr_id, NULL chr_val_id FROM dual UNION
    SELECT 2 item_id, 70 chr_id, 12597376 chr_val_id FROM dual UNION
    SELECT 2 item_id, 16832 chr_id, NULL chr_val_id FROM dual UNION
    SELECT 2 item_id, 7886 chr_id, 9588619 chr_val_id FROM dual UNION
    SELECT 2 item_id, 6986 chr_id, 2659351 chr_val_id FROM dual UNION
    SELECT 3 item_id, 9531 chr_id, 8910943 chr_val_id FROM dual UNION
    SELECT 3 item_id, 9798 chr_id, 8717531 chr_val_id FROM dual UNION
    SELECT 3 item_id, 17446 chr_id, 12266441 chr_val_id FROM dual UNION
    SELECT 3 item_id, 4830 chr_id, 13683090 chr_val_id FROM dual UNION
    SELECT 3 item_id, 9518 chr_id, 834772 chr_val_id FROM dual UNION
    SELECT 3 item_id, 11031 chr_id, 20233753 chr_val_id FROM dual UNION
    SELECT 3 item_id, 12564 chr_id, 2282478 chr_val_id FROM dual)
    SELECT DISTINCT item_id
    FROM   t
    MINUS
    SELECT DISTINCT item_id
    FROM   t
    WHERE  chr_val_id IS NULLOr this:
    SELECT item_id
    FROM  (SELECT   item_id,
                    MIN(NVL(chr_val_id, -1)) min_chr_val_id
           FROM     t
           GROUP BY item_id)
    WHERE  min_chr_val_id != -1Edited by: lee200 on Oct 15, 2012 9:22 AM

  • HT1338 I have a macbook Pro i7 mid november 2010. I am wondering if i can exchange my notebook with the latest one. Can anyone help me out with this query please.

    I have a macbook Pro i7 mid november 2010. I am wondering if i can exchange my notebook with the latest one. Can anyone help me out with this query please.

    You can sell your existing computer using eBay, Craigslist or the venue of your choice. You could then use the proceeds to purchase a new computer.

  • Stuck with this query

    i have stuck in this query. it is giving compile error that v_customerloop invalid identifier. this does not make sense because if i comment the sql, it runs fine and i can actually see the count in the dbms output. i tried commenting out some of the where clauses but cannot pinpoint where i am making a mistake.
    can some one see if i am doing something out of ordinary.
    declare
      -- Local variables here
    o_errorcode     NUMBER;
           o_errortext     VARCHAR2(1000);
    o_LoopId      NUMBER;
    i_CustomerLoop      Kroner.Pkgsldcommon.T_CUSTOMERLOOPTYPE;
    To_CustomerLoop Kroner.Pkgsldcommon.T_CUSTOMERLOOPTYPE;
      v_sql        VARCHAR2(3000);
    v_CustomerLoop Kroner.t_CustomerLoopElement := Kroner.t_CustomerLoopElement();
    begin
        i_CustomerLoop(1).Cable := '138-2';
      i_CustomerLoop(1).coup := '501';
      i_CustomerLoop(1).TermSysID := 1178050;
      i_CustomerLoop(1).CentralOfficeName := 'TOROON45';
         i_CustomerLoop(2).Cable := '138-2';
      i_CustomerLoop(2).coup := '503';
      i_CustomerLoop(2).TermSysID := 1178052;
      i_CustomerLoop(2).CentralOfficeName := 'TOROON45';
       FOR i IN 1..i_CustomerLoop.COUNT -- Create a instance of Kroner.o_CustomerLoopElement
       LOOP 
               v_CustomerLoop.Extend();
               v_CustomerLoop(i) := Kroner.o_CustomerLoopElement(co_clli => i_CustomerLoop(i).CentralOfficeName,
                                                cable => i_CustomerLoop(i).Cable,
                                                coup => i_CustomerLoop(i).coup,
                                                termsysid => i_CustomerLoop(i).TermSysID,
                                                landing_number => i
       END LOOP;
       dbms_output.put_line('v_CustomerLoop length' || v_CustomerLoop.Count);
    v_sql:= 'select loop_f1.loopid
                 from nrms_interface.wdn_landing seg_f1, nrms_interface.wdn_loop_landing_association assoc_f1, nrms_interface.wdn_potential_loop_makeup loop_f1,
                 nrms_interface.wdn_landing seg_fx, nrms_interface.wdn_loop_landing_association assoc_fx,
                 table(cast( v_CustomerLoop as Kroner.t_CustomerLoopElement)) input_loop
            where loop_f1.CO_CLLI =  v_CustomerLoop(1).co_clli
            and loop_f1.LOOPID = assoc_f1.LOOPID
            and assoc_f1.landing_NUMBER = v_CustomerLoop(1).landing_number
            and assoc_f1.landing_ID = seg_f1.landing_ID
            and seg_f1.CABLE = v_CustomerLoop(1).cable
            and (seg_f1.low_coup <= v_CustomerLoop(1).coup and seg_f1.high_coup >= v_CustomerLoop(1).coup)
            and seg_f1.TERMSYSID = v_CustomerLoop(1).termsysid
            and assoc_f1.landing_number = 1
            and loop_f1.loopid = assoc_fx.loopid
            and assoc_fx.landing_ID = seg_fx.landing_id
            and assoc_fx.landing_number = input_loop.landing_number
            and seg_fx.CABLE = input_loop.cable
            and (seg_fx.low_coup <= input_loop.coup and seg_fx.high_coup >= input_loop.coup)
            and seg_fx.termsysid = input_loop.termsysid
            group by loop_f1.loopid
            having max(assoc_fx.landing_NUMBER) = :noOflandings
            and count(case when assoc_fx.landing_number = input_loop.landing_number then 1 else 0 end) = :noOflandings';
    EXECUTE IMMEDIATE v_sql  INTO o_LoopId
    USING  v_CustomerLoop.count,v_CustomerLoop.count;

    Hi,
    I don't know much about object types, but I think that the error is due to the usage of v_CustomerLoop variable in a different context.
    Imagine that using the EXECUTE IMMEDIATE you spawn a different process that communicates with the caller using prameters (USING) and return values (INTO).
    In this case, the variable is not visible by the new environement (it is not the same behaviour of nesting a BEGIN/END block in a procedure and referencing a parent variable)
    Hope this helps
    Max

  • PROBLEM WITH THIS QUERY:URGENT

    hi every body
    this query works fine with an acces databse but it dosen,t work with the same database(the same model) in oracle it gives any error message while compiling or excuting but when i,ve tried it with pl/sql develloper(it's an oracle editor) it gives the folowing message:MISSING SET...
    UPDATE T_ITEMBONCOMMANDE,TTT_BON_COMMANDE,TTT_PIECEMANUFACTURIER,TTT_PIECE_INVENTAIRE SET ttt_itemBONCOMANDE.quantiteretourne='" +app.trim()+"' WHERE TTT_PIECE_INVENTAIRE.PIECEMANUFACTURIER_ID=TTT_PIECEMANUFACTURIER.PIECEMANUFACUTIRIER_ID AND TTT_ITEMBONCOMMANDE.PIECEINVENTAIRE_ID=TTT_PIECE_INVENTAIRE.PIECEINVENTAIRE_ID AND TTT_BON_COMMANDE.bon_commande_id =TTT_ITEMBONCOMMANDE.boncommande_id AND TTT_PIECEMANUFACTURIER.NUMEROPIECE LIKE'" +NumPiece.trim()+"' AND TTT_ITEMBONCOMMANDE.boncommande_id LIKE '" +NumeroPO.trim()+"' AND TTT_ITEMBONCOMMANDE.quantiterecu -'"+app.trim()+"'>=0 "

    UPDATE
    T_ITEMBONCOMMANDE,TTT_BON_COMMANDE,TTT_PIECEMANUFACTURI
    R,TTT_PIECE_INVENTAIRE SET
    ttt_itemBONCOMANDE.quantiteretourne='" +app.trim()+"'
    WHERE
    TTT_PIECE_INVENTAIRE.PIECEMANUFACTURIER_ID=TTT_PIECEMAN
    FACTURIER.PIECEMANUFACUTIRIER_ID AND
    TTT_ITEMBONCOMMANDE.PIECEINVENTAIRE_ID=TTT_PIECE_INVENT
    IRE.PIECEINVENTAIRE_ID AND
    TTT_BON_COMMANDE.bon_commande_id
    =TTT_ITEMBONCOMMANDE.boncommande_id AND
    TTT_PIECEMANUFACTURIER.NUMEROPIECE LIKE'"
    +NumPiece.trim()+"' AND
    TTT_ITEMBONCOMMANDE.boncommande_id LIKE '"
    +NumeroPO.trim()+"' AND
    TTT_ITEMBONCOMMANDE.quantiterecu -'"+app.trim()+"'>=0
    "a few things...
    1) you seem to be updating multiple tables at once. i don't believe this is possible. if access let's you do it that's another matter. i
    think you will need multiple statements to do what you are attempting.
    2) SET ttt_itemBONCOMANDE.quantiteretourne='" app.trim()"' this
    part of your query... ttt_itemBONCOMANDE should corresponde to some table name you have listed... i don't see it.
    3) since you are only updating the one field why are you joining all these tables together anyway? maybe the table design needs work. i
    realize this is not a programming comment but something looks awry here.

  • Hit error on this query, query was running fine in SQL Server Mgnt Studio

    Dear Experts,
    Can anyone help me with executing this error? I hit random errors when executing this query on SBO 2007 PL12. When I execute this query on SBO 2005, the client application exits immediately.
    SELECT DISTINCT U0., U1.
    FROM
                    (SELECT  t0.DocNum [Inv No], t0.ReceiptNum, t0.CardName [Inv BP], t0.DocStatus [Inv Status], t0.DocTotal [Inv Total]
                    FROM OINV t0 WHERE t0.Canceled = 'N' ) U0
    LEFT OUTER JOIN
                    SELECT t0.DocNum [PV Number], t0.CardCode , t0.CardName [Customer Name], t0.Address [Pay To],
                    t0.DocType,t0.Canceled, t0.DocDate [Document Date], 'CHEQUE' [Type], t1.CheckNum [Number], t0.CheckSum [Sum], t1.DueDate [Date], t0.CheckAcct [Ref], t0.DocCurr [Curency], t0.DocTotal [Doc Total]
                    FROM orct t0 INNER JOIN rct1 t1 ON t0.DocNum = t1.DocNum  WHERE t0.CheckSum > 0
                    UNION ALL
                    SELECT t0.DocNum [PV Number], t0.CardCode, t0.CardName [Customer Name], t0.Address [Pay To],
                    t0.DocType, t0.Canceled, t0.DocDate [Document Date], 'BANK TRANSFER' [Type], t1.FormatCode [Number], t0.TrsfrSum [Sum], t0.trsfrDate[Date], t0.TrsfrRef [Ref], t0.DocCurr [Curency], t0.DocTotal [Doc Total]
                    FROM orct t0 inner join oact t1 on t0.TrsfrAcct = t1.acctcode  where NOT trsfracct IS NULL and trsfracct != '' AND trsfrsum > 0
                    UNION ALL
                    SELECT t0.DocNum [PV Number], t0.CardCode, t0.CardName [Customer Name], t0.Address [Pay To],
                    t0.DocType, t0.Canceled, t0.DocDate [Document Date], 'CREDIT CARD' [Type], t1.CreditCard [Number], t1.NumOfPmnts [Sum], t1.FirstDue [Date], t1.VoucherNum [Ref], t0.DocCurr [Curency], t0.DocTotal [Doc Total]
                    FROM orct t0 INNER JOIN rct3 t1 ON t0.DocNum = t1.DocNum  WHERE t0.CreditSum > 0
                    UNION ALL
                    SELECT t0.DocNum [PV Number], t0.CardCode, t0.CardName [Customer Name], t0.Address [Pay To],
                    t0.DocType, t0.Canceled, t0.DocDate [Document Date], 'CASH' [Type], t1.Formatcode [Number], t0.CashSum [Sum], t0.DocDate [Date], '' [Ref], t0.DocCurr [Curency], t0.DocTotal [Doc Total]
                    FROM orct t0 inner join oact t1 on t0.CashAcct = t1.acctcode  where NOT CashAcct IS NULL and CashSum > 0
                    U1 ON U0.ReceiptNum = U1.[PV Number]
    WHERE U1.CardCode BETWEEN '[%0]' AND '[%1]'
    ORDER BY U1.[PV Number]
    Problem lies with this line "U1 ON U0.ReceiptNum = U1.[PV Number]", once i remove this line, the query was able to run.
    Much Thanks!
    Warmest Regards,
    Chihno

    Hi All,
    This is a sample of the working query:
    SELECT  U2.[PV Number], U2.[Customer No], U2.[Customer Name], U2.[Pay To], U2.DocType,U2.Canceled, U2.[Document Date], U2.[Type],U2.[Number], U2.[Sum], U2.[Date], U2.[Ref], U2.[Curency], U2.[Doc Total], U2.[Status] , U2.Submitted, U2.PayMth, U2.Confirmed, U2.CreateTran
    FROM
                    SELECT t0.DocNum [PV Number], t0.CardCode [Customer No], t0.CardName [Customer Name], t0.Address [Pay To],
                    t0.DocType,t0.Canceled, t0.DocDate [Document Date], 'CHEQUE' [Type], t1.CheckNum [Number], t0.CheckSum [Sum], t1.DueDate [Date], t0.CheckAcct [Ref], t0.DocCurr [Curency], t0.DocTotal [Doc Total], t0.Status [Status] , t0.Submitted, t0.PayMth, t0.Confirmed, t0.CreateTran, t2.DocNum [Linked InvNo], t0.DocEntry
                    FROM orct t0 INNER JOIN rct1 t1 ON t0.DocNum = t1.DocNum LEFT JOIN rct2 t2 ON t0.DocNum = t2.DocNum  WHERE t0.CheckSum > 0 AND t0.DocType <> 'A'
                    UNION ALL
                    SELECT t0.DocNum [PV Number], t0.CardCode [Customer No], t0.CardName [Customer Name], t0.Address [Pay To],
                    t0.DocType, t0.Canceled, t0.DocDate [Document Date], 'BANK TRANSFER' [Type], t1.FormatCode [Number], t0.TrsfrSum [Sum], t0.trsfrDate[Date], t0.TrsfrRef [Ref], t0.DocCurr [Curency], t0.DocTotal [Doc Total], t0.Status [Status] , t0.Submitted, t0.PayMth, t0.Confirmed, t0.CreateTran, t2.DocNum [Linked InvNo], t0.DocEntry
                    FROM orct t0 inner join oact t1 on t0.TrsfrAcct = t1.acctcode  LEFT JOIN rct2 t2 ON t0.DocNum = t2.DocNum   where NOT trsfracct IS NULL and trsfracct != '' AND trsfrsum > 0  AND t0.DocType <> 'A'
                    UNION ALL
                    SELECT t0.DocNum [PV Number], t0.CardCode [Customer No], t0.CardName [Customer Name], t0.Address [Pay To],
                    t0.DocType, t0.Canceled, t0.DocDate [Document Date], 'CREDIT CARD' [Type], t1.CreditCard [Number], t1.NumOfPmnts [Sum], t1.FirstDue [Date], t1.VoucherNum [Ref], t0.DocCurr [Curency], t0.DocTotal [Doc Total], t0.Status [Status] , t0.Submitted, t0.PayMth, t0.Confirmed, t0.CreateTran, t2.DocNum [Linked InvNo], t0.DocEntry
                    FROM orct t0 INNER JOIN rct3 t1 ON t0.DocNum = t1.DocNum  LEFT JOIN rct2 t2 ON t0.DocNum = t2.DocNum   WHERE t0.CreditSum > 0  AND t0.DocType <> 'A'
                    UNION ALL
                    SELECT t0.DocNum [PV Number], t0.CardCode [Customer No], t0.CardName [Customer Name], t0.Address [Pay To],
                    t0.DocType, t0.Canceled, t0.DocDate [Document Date], 'CASH' [Type], t1.Formatcode [Number], t0.CashSum [Sum], t0.DocDate [Date], '' [Ref], t0.DocCurr [Curency], t0.DocTotal [Doc Total], t0.Status [Status] , t0.Submitted, t0.PayMth, t0.Confirmed, t0.CreateTran, t2.DocNum [Linked InvNo], t0.DocEntry
                    FROM orct t0 inner join oact t1 on t0.CashAcct = t1.acctcode LEFT JOIN rct2 t2 ON t0.DocNum = t2.DocNum    where NOT CashAcct IS NULL and CashSum > 0  AND t0.DocType <> 'A'
                    )  U2
    INNER JOIN OCRD U3 ON U2.[Customer No] = U3.CardCode
    INNER JOIN ORCT U4 ON U2.DocEntry = U4.DocEntry
    WHERE U2.[Linked InvNo] IS NULL  AND U2.Canceled = 'N' AND U3.CardCode BETWEEN '[%0]' AND '[%1]' AND U4.DocDate BETWEEN '[%2]' AND '[%3]'
    ORDER BY U2.[PV Number] ASC
    Hope it helps.
    Warmest Regards,
    Chinho

  • Error with bex query in web

    Good morning together,
    i have trouble again with a BEx Query in our BW landscape.
    I have created a query with a lot of key figures. When i call it in BEx (Excel) i get data; everything is ok.
    But when i say, execute this query in web, or try to call the query in connection with a web template i get the error message "no data was found".
    It is the same selection what i choose in the variable screen. How can i solve this error?
    Thanks to all.

    Thanks for your reply Suman,
    the WT is ok. Have checked the RSRT too. i get everytime the message
    "No Data available
    Could not find any data to display. This might be due to the current selection of variable or filter values".
    although in BEX (Excel) I get data with the same selection.

Maybe you are looking for

  • Freezing issues with MSI 970A-G43 and AMD FX 8320

    Hey all, I bought my brother a new system a few days ago, but he has had serious issues with the machine crashing ever since. The machine has had a fresh installation of Windows 7, it has all the latest drivers for both motherboard, sound, chipset an

  • Xpath expression for a requirement

    Hi, I have a xpath like below in my bpel code ( which works perfectly fine). /ns15:ShortName[starts-with(.,'ABC') or starts-with(.,'PQR')] This gives me the ShortName which starts with either ABC or PQR. However our requirement is changing and we wan

  • PI SWC Naming convention

    Hello, I've read this SAP [document|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/40a66d0e-fe5e-2c10-8a85-e418b59ab36a] about best practices naming convention and I still don't have a clear idea about how many software components I have to c

  • Macbook Pro Non-Retina OS

    I'm currently planning on getting the macbook pro non retina but I have a question. Does it come with the latest Mac OS (yosemite)? If so, doest it work smoothly like on any other macbook? Answers appreciated

  • GroupWise6.5 Integration with FileNet and Hummingbird

    Hi, I would like to know if anyone have done GroupWise 6.5 Integration with FileNet or Hummingbird. FileNet and Hummingbird provides Enterprise Content Management (ECM) solutions. Thanks Ranjan