What is wrong With My Query

Pleas what is wrong with this query
     select h.business_unit_id bu, h.edi_sequence_id seq, d.edi_det_sequ_id dseq, s.edi_size_sequ_id sseq, h.po_number po, h.total_unit tUnit, h.total_amount tDollar, s.quantity qty, s.unit_price price,
(select (case when count(*) = 0 then 'N' else 'Y' end)
from(select s.business_unit_id, s.edi_sequence_id, s.edi_det_sequ_id, s.edi_size_sequ_id
from sewn.nt_edii_purchase_size s
where s.business_unit_id='01'
and s.edi_sequence_id = '168420'
and (s.edi_sequence_id, s.edi_det_sequ_id, s.edi_size_sequ_id) not in
(select edi_sequence_id, edi_det_sequ_id, edi_size_sequ_id
from sewn.nt_edii_po_det_error
where business_unit_id = '01'
and edi_sequence_id='168420'
and error_code in(select error_code
from sewn.nt_edii_error_codes
where severity='CR'))))eligible
from sewn.nt_edii_purchase_size s, sewn.nt_edii_purchase_det d,
sewn.nt_edii_purchase_hdr h
where h.business_unit_id = '01'
and h.edi_sequence_id = '168420'
and h.business_unit_id = d.business_unit_id
and h.edi_sequence_id = d.edi_sequence_id
and d.business_unit_id = s.business_unit_id
and d.edi_sequence_id = s.edi_sequence_id
and d.edi_det_sequ_id = s.edi_det_sequ_id
group by h.business_unit_id, h.edi_sequence_id, d.edi_det_sequ_id,
s.edi_size_sequ_id,h.po_number, h.total_unit, h.total_amount, s.quantity,s.unit_price

Never mind, I got it working

Similar Messages

  • What's wrong with my query

    I keep getting an "improper syntax" error for the following
    query. I'm not sure what I'm doing wrong. The idea is that, if the
    number entered in the form falls between spec values 24 and 25 and
    the tuning value (spec vale 23) also matches, then the results get
    displayed.
    Thanks.
    <cfquery name="foo" datasource="#application.dsn#">
    select * from models
    where (modelnumber LIKE 'TLB%') AND spec_24_value LTE
    '#Form.wavelength#' AND spec_25_value GTE '#Form.wavelength#' AND
    spec_23_value IS '#Form.tuning#'
    </cfquery>

    Thanks for the help. Now I'm having trouble with the output.
    The data is showing up fine, but for some reason the "if
    recordcount is zero" condition isn't working. I'm just getting a
    blank space where the "try again" message should go....
    <cfoutput query="foo">
    <cfif foo.recordcount is "0">
    Your search did not return any results, please try again.
    <cfelse>
    <p class="normaltext">
    <a
    href="/product/model.cfm?productlineid=1&modelgroupid=#foo.ModelGroupID#&modelno=#foo.Mod elNumber#"><b>#foo.name#</b></a><br>
    Model Number: #foo.modelnumber#<br>
    Wavelength Range: #foo.spec_1_Value#<br><br>
    </p>
    </cfif>
    </cfoutput>

  • What is wrong with this query?

    Hi,
    The below query is showing this error:
    ORA-01788:CONNECT BY LOOP in user data.
    Please let me know where i am going wrong?
    The data in the table xx_dates is :
    Empno        date1                      date2
    1           20-JAN-2008            24-JAN-2008
    2           20-JAN-2008            20-JAN-2008The query i am using is:
    select empno,date1,date2,date1+level-1,level,DBMS_RANDOM.random
    from xx_dates
    connect by empno=prior empno  start with empno=1
               and date1 <= date2-level + 1Edited by: Sreekanth Munagala on Nov 17, 2008 6:01 AM

    Or maybe it's this you are looking for...
    SQL> ed
    Wrote file afiedt.buf
      1  with xx_dates as (select 1 as empno, to_date('20-JAN-2008','DD-MON-YYYY') as date1, to_date('24-JAN-2008','DD-MON-YYYY') as date2 from dual union all
      2                    select 2, to_date('20-JAN-2008','DD-MON-YYYY'), to_date('20-JAN-2008','DD-MON-YYYY') from dual)
      3  --
      4  select empno,date1,date2,date1+level-1,level,DBMS_RANDOM.random
      5  from xx_dates
      6  connect by level <= (date2-date1) + 1
      7* start with empno=1
    SQL> /
         EMPNO DATE1                DATE2                DATE1+LEVEL-1             LEVEL     RANDOM
             1 20-JAN-2008 00:00:00 24-JAN-2008 00:00:00 20-JAN-2008 00:00:00          1 -291581367
             1 20-JAN-2008 00:00:00 24-JAN-2008 00:00:00 21-JAN-2008 00:00:00          2 1347815622
             1 20-JAN-2008 00:00:00 24-JAN-2008 00:00:00 22-JAN-2008 00:00:00          3 -595509310
             1 20-JAN-2008 00:00:00 24-JAN-2008 00:00:00 23-JAN-2008 00:00:00          4 -1.602E+09
             1 20-JAN-2008 00:00:00 24-JAN-2008 00:00:00 24-JAN-2008 00:00:00          5 -1.511E+09
    SQL>

  • What's wrong with this query ?

    v_SQL := 'OPEN RCT' || v_iLevel || ' FOR
                   SELECT     datasets.*,
                        CASE fn_GetSupplierStatus(:p_SupplierID, DatasetID)
                             WHEN 1 THEN SMfn_GetSpecifiedRow(:p_SupplierStatus, 1)
                             WHEN 3 THEN SMfn_GetSpecifiedRow(:p_SupplierStatus, 2)
                             WHEN 4 THEN SMfn_GetSpecifiedRow(:p_SupplierStatus, 3)
                             WHEN 5 THEN SMfn_GetSpecifiedRow(:p_SupplierStatus, 4)
                             ELSE
                                  CASE IsDataset
                                       WHEN 0 THEN SMfn_GetSpecifiedRow(:p_SupplierStatus, 5)
                                       ELSE SMfn_GetSpecifiedRow(:p_SupplierStatus, 5)
                                  END
                             END AS CStatus,
                             CASE fn_GetUserPermission(:p_UserID, DatasetID)
                                  WHEN 2 THEN SMfn_GetSpecifiedRow(:p_UserPermission, 1)
                                  ELSE
                                       CASE IsDataset
                                            WHEN 0 THEN ''''
                                            ELSE SMfn_GetSpecifiedRow(:p_UserPermission, 2)
                                       END
                             END AS UStatus,
                             SMfn_DatasetHasChildren(DatasetID) as HasChildren,
                             :p_RoleID as RoleID
                        FROM datasets
                        WHERE     Level_ = :v_iLevel';
              raise_application_error(-20001, v_SQL);
              execute immediate v_SQL
                   using     p_SupplierID, p_SupplierStatus, p_SupplierStatus, p_SupplierStatus, p_SupplierStatus,
                        p_SupplierStatus, p_SupplierStatus, p_UserID, p_UserPermission, p_UserPermission, p_RoleID, v_iLevel;
    What I am trying to do is to populate the cursor using a dynamic query, so that I can change cursor name each time.
    All functions used exist, and still I get this error: Invalid SQL statement.
    Is it possible to populate a cursor which is a parameter to the procedure (ref cursor) with a dynamic query ?
    Thanks.

    this is the query that gets executed:
    OPEN RCT1 FOR
                   SELECT     datasets.*,
                        CASE fn_GetSupplierStatus(:p_SupplierID, DatasetID)
                             WHEN 1 THEN SMfn_GetSpecifiedRow(:p_SupplierStatus, 1)
                             WHEN 3 THEN SMfn_GetSpecifiedRow(:p_SupplierStatus, 2)
                             WHEN 4 THEN SMfn_GetSpecifiedRow(:p_SupplierStatus, 3)
                             WHEN 5 THEN SMfn_GetSpecifiedRow(:p_SupplierStatus, 4)
                             ELSE
                                  CASE IsDataset
                                       WHEN 0 THEN SMfn_GetSpecifiedRow(:p_SupplierStatus, 5)
                                       ELSE SMfn_GetSpecifiedRow(:p_SupplierStatus, 5)
                                  END
                             END AS CStatus,
                             CASE fn_GetUserPermission(:p_UserID, DatasetID)
                                  WHEN 2 THEN SMfn_GetSpecifiedRow(:p_UserPermission, 1)
                                  ELSE
                                       CASE IsDataset
                                            WHEN 0 THEN ''
                                            ELSE SMfn_GetSpecifiedRow(:p_UserPermission, 2)
                                       END
                             END AS UStatus,
                             SMfn_DatasetHasChildren(DatasetID) as HasChildren,
                             :p_RoleID as RoleID
                        FROM datasets
                        WHERE     Level_ = :v_iLevel
    The select works fine (without "Open RCT1 FOR") if I try to run it, but when trying to populate the cursor, I get the error Ivalid SQL statement.

  • What is wrong with mySQL query?

    My query is:
    mysql_select_db($database_mysql, $mysql);
    $query_Recordset1 = 'SELECT *, FORMAT(`RPI`,2) As RPI,`CPU`*`Cores` As Phys_Cores, `OS_disks`+`Project_disks`+`Output_disks` as Disks, FORMAT(`Gain`,1) As Gain FROM `Personal_data`,`Benchmark_results` WHERE Personal_data.Ref_ID = Benchmark_results.Ref_ID '.$conditions.' ORDER BY Total, RPI ASC' ;
    Notice the 2 decimals in the Format(`RPI`,2) statement, but I get:
    So how do I get this shown as 1.00 instead of 1?
    For the site in question, look here: http://ppbm5.com/DB-PPBM5-2.php

    Sorry for this stupid question, but where in the original query do I need to make these changes:
    $query_Recordset1 = 'SELECT *, FORMAT(`RPI`,2) As RPI,`CPU`*`Cores` As Phys_Cores, `OS_disks`+`Project_disks`+`Output_disks` as Disks, FORMAT(`Gain`,1) As Gain FROM `Personal_data`,`Benchmark_results` WHERE Personal_data.Ref_ID = Benchmark_results.Ref_ID '.$conditions.' ORDER BY Total, RPI ASC' ;
    Where do I put the "AS DECIMAL(7,2))" in this statement? All I get is mySQL errors in the query, so I must be doing something terribly wrong here.

  • What's wrong with this query--need help

    Requirement: need to get the names of employees who were hired on tuesday this has to use to_char function
    select ename
    from emp
    where to_char(hiredate,'day')='tuesday';
    when i execute the query
    o/p is no rows selected
    please help.
    thanks in advance.

    Hi,
    861173 wrote:
    Requirement: need to get the names of employees who were hired on tuesday this has to use to_char function
    select ename
    from emp
    where to_char(hiredate,'day')='tuesday';
    when i execute the query
    o/p is no rows selected Try:
    WHERE   TO_CHAR (hiredate, 'fmday')  = 'tuesday'Without 'FM" in the 2nd argument, TO_CHAR pads the results to make it a consistent length. If your NLS_DATE_LANGUAGE=ENGLISH, that means it will always return a 9-character string, since the longest name in English ('Wednesday') has 9 letters. 'FM' (case-insernsitive) tells TO_CHAR not to add that kind of padding.

  • Any see what is wrong with this query?

    Logs Record Set - query - Top 4 of 4 Rows
    ATTRIBUTES DATELASTMODIFIED DIRECTORY MODE NAME SIZE TYPE
    1 [empty string] 06/06/2007 10:59:17 AM
    G:\Tracker\wwwRoot\Data
    [empty string] ChargedOut_06Jun2007_ILS_105634322.txt 828
    File
    2 [empty string] 06/06/2007 10:57:00 AM
    G:\Tracker\wwwRoot\Data
    [empty string] Error_06Jun2007_ ILS_105634322.txt 88 File
    3 [empty string] 06/06/2007 10:58:46 AM
    G:\Tracker\wwwRoot\Data
    [empty string] Final_06Jun2007_ ILS_105634322.txt 27841 File
    4 [empty string] 06/06/2007 10:56:07 AM
    G:\Tracker\wwwRoot\Data
    [empty string] Upload_06Jun2007_ ILS_105634322.txt 94768 File
    ChargeOut Stats - struct
    CACHED false
    COLUMNLIST NAME
    EXECUTIONTIME 0
    RECORDCOUNT 0
    SQL SELECT Name FROM Logs WHERE Name = 'ChargedOut_06Jun2007_
    ILS_105634322.txt'
    chargeOut Record Set - query - Top 0 of 0 Rows
    NAME
    CODE
    <cfdirectory directory="#ExpandPath('data')#"
    action="list" name="Logs"
    sort="Name">
    <cfquery dbtype="query" name="ChargedOut"
    result="stats">
    SELECT Name
    FROM Logs
    WHERE Name = 'ChargedOut#Set#.txt'
    </cfquery>
    I can not see why SELECT Name FROM Logs WHERE Name =
    'ChargedOut_06Jun2007_ ILS_105634322.txt' is not returning
    the
    corresponding record from the logs record set.

    Thanks, I finally saw the errant white space character!

  • What is wrong with my XPath Query ??

    Hi Guys,
    please help me to solve the following problem. Trying to execute :
    XPathAPI.selectNodeList(MyNode,"//*[starts-with()='WType']")
    throws always an exception :
    javax.xml.transform.TransformerException: FuncStartsWith only allows 2 arguments
    What doesn't that mean ? What's wrong with my query ?

    According to my XSLT book, the starts-with() function requires 2 arguments. You haven't given it any arguments, and that seems to be exactly what the error message is telling you. And it returns a boolean, so comparing that with a string isn't going to work either.
    I suggest you will find Mulberry's xsl-list a better place to ask questions about XSLT than a Java forum. You can find it here:
    http://www.mulberrytech.com/xsl/xsl-list/

  • ANY wild Card is not working in MODEL - What is wong with my query?

    Hi Gurus,
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    CREATE TABLE "SALES"
       (     "COUNTRY" VARCHAR2(5 BYTE),
         "PRODUCT" VARCHAR2(5 BYTE),
         "YEAR" NUMBER,
         "SALES" NUMBER
    insert into sales values('A','prod1',2000,10);When I pass the product name in the model calsue I am getting the expected result
    select *
    from sales
    model
    PARTITION BY (country)
    dimension by (product,year)
    measures(sales s)
    rules  upsert
    s['prod1',2001]=s['prod1',2000]*2
    COUNTRY PRODUCT YEAR S
    A       prod1   2000 10
    A       prod1   2001 20 but When I use, ANY, I am not getting the result. What is wrong with my query?
    select *
    from sales
    model
    PARTITION BY (country)
    dimension by (product,year)
    measures(sales s)
    rules  upsert
    s[ANY,2001]=s[cv(product),2000]*2
    COUNTRY PRODUCT YEAR S
    A       prod1   2000 10 Thanks in advance.
    Edited by: 884476 on Oct 29, 2012 12:51 AM
    Please feel free to ask any further details required..

    You need to use UPSERT ALL rather than just UPSERT.
    The documentation [url http://docs.oracle.com/cd/E11882_01/server.112/e25554/sqlmodel.htm#i1011770]here explains that UPSERT can only insert with "positional reference" and not "symbolic reference", and ANY wildcard is always "symbolic reference". But UPSERT ALL allows model rules with existential predicates (comparisons, IN, ANY, and so on) in their left side to have UPSERT behavior.

  • What's wrong with my approval procedure query ?

    Hi everybody,
    This is my query :
    SELECT DISTINCT 'TRUE' FROM RDR1 WHERE $[$38.U_Prix_plancher.number] >=$[$38.Price.number]
    What's wrong with that ?
    Thanks
    Ara

    Ara,
    The problem is not with your Query but the problem is with the way the Query gets trigerred for an Approval Process.
    SAP only recognizes the value of a $[$38.x.x] parameter when that particular row is active.
    I suggest you can test this by simply highlight that particular row which breaks the rule and try to Add the document and you will see that the Approval Procudure will fire.
    Also remember an Approval Procudure works only when you are in Add Mode and does not on Update.
    Regards
    Suda

  • Can someone tell me what's wrong with this LOV query please?

    This query works fine..
    select FILTER_NAME display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = 'ADAM'
    But this one..
    select FILTER_NAME display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = apex_application.g_user
    Gives the following error.
    1 error has occurred
    * LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
    Thanks very much,
    -Adam vonNieda

    Ya know, I still don't know what's wrong with this.
    declare
    l_val varchar2(100) := nvl(apex_application.g_user,'ADAM');
    begin
    return 'select filter_name display_value, filter_id return_value
    from otmgui_filter where username = '''|| l_val || '''';
    end;
    Gets the same error as above. All I'm trying to do is create a dropdown LOV which selects based on the apex_application.g_user.
    What am I missing here?
    Thanks,
    -Adam

  • How to find quickly what's wrong with the performance of a BW Query?

    Hi All,
    After a long time, I had to work on performance tuning of a query, Version BI 7.0 EHP 1, SP7.
    Compression in done, BI Stats are running, showing that OLAP time is high almost 70%, compared to 20% DB Read time.
    Aggregates cannot be created due to the nature of the cube, BIA is out of scope.
    How to find quickly, step by step, what's wrong with a particular query.
    Thanks in advance,
    Best Regards,
    - Shashi

    Hi Sashi ,
    1. OLAP time is more, you need to  increase OLAP cache, you have different options for the query in RSRT t-code..
    Select properties which makes to store the query result set in OLAP Cache for permanent.
    Doc for the same :
    http://www.sdn.sap.com/44A46FE1-6DC0-4F2C-A8CB-A1BB45DF0186/FinalDownload/DownloadId-ED38793C4C172FE2AFFDE727E36B3991/44A46FE1-6DC0-4F2C-A8CB-A1BB45DF0186/irj/scn/go/portal/prtroot/docs/library/uuid/f048c590-31a4-2c10-8599-bd01fabb93d4?QuickLink=index&overridelayout=true
    2.Use only less no of Characteristics in the initial report. Place remaining in Free characteristics.
    3.You need to check the query .It cmod code exist for any variable or your query have lots of navigational attributes then try to check for code efficiency .
    4.If Front End time more then try to avoid the more characteristics in displaying the query result.
    5.Use authorization objects on queries if possible .That will reduce data amount .
    6.Use query read mode and  global structures as when possible.
    Some helpful links :
    http://www.tli-usa.com/download/Expert_Tips_and_New_Techniques_for_Optimizing_Data_Load_and_Query_Performance__Part_Two_.pdf
    how to increase the performance
    Aggregates in SAP BW
    bw statistics
    What is the use of cube partition?
    Create indices before or after compression
    Regards,
    Jaya Tiwari

  • 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

  • What's wrong with this SQL?

    what's wrong with this SQL?
    Posted: Jan 16, 2007 9:35 AM Reply
    Hi, everyone:
    when I insert into table, i use the fellowing SQL:
    INSERT INTO xhealthcall_script_data
    (XHC_CALL_ENDED, XHC_SWITCH_PORT, XHC_SCRIPT_ID, XHC_FAX_SPECIFIED)
    VALUES (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT, HH_SCRIPT,'N'
    FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE' UNION
    SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT, HH_SCRIPT,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE');
    I always got an error like;
    VALUES (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT,
    ERROR at line 3:
    ORA-00936: missing expression
    but I can't find anything wrong, who can tell me why?
    thank you so much in advance
    mpowel01
    Posts: 1,516
    Registered: 12/7/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:38 AM in response to: jerrygreat Reply
    For starters, an insert select does not have a values clause.
    HTH -- Mark D Powell --
    PP
    Posts: 41
    From: q
    Registered: 8/10/06
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:48 AM in response to: mpowel01 Reply
    Even I see "missing VALUES" as the only error
    Eric H
    Posts: 2,822
    Registered: 10/15/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:54 AM in response to: jerrygreat Reply
    ...and why are you doing a UNION on the exact same two queries?
    (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS') ,HH_SWITCHPORT ,HH_SCRIPT ,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE' UNION SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS') ,HH_SWITCHPORT ,HH_SCRIPT ,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE');
    jerrygreat
    Posts: 8
    Registered: 1/3/07
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:55 AM in response to: mpowel01 Reply
    Hi,
    thank you for your answer, but the problem is, if I deleted "values" as you pointed out, and then execute it again, I got error like "ERROR at line 3:
    ORA-03113: end-of-file on communication channel", and I was then disconnected with server, I have to relogin SQLplus, and do everything from beganing.
    so what 's wrong caused disconnection, I can't find any triggers related. it is so wired?
    I wonder if anyone can help me about this.
    thank you very much
    jerry
    yingkuan
    Posts: 1,801
    From: San Jose, CA
    Registered: 10/8/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:59 AM in response to: jerrygreat Reply
    Dup Post
    jerrygreat
    Posts: 8
    Registered: 1/3/07
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 10:00 AM in response to: Eric H Reply
    Hi,
    acturlly what I do is debugging a previous developer's scipt for data loading, this script was called by Cron work, but it never can be successfully executed.
    I think he use union for eliminating duplications of rows, I just guess.
    thank you
    jerry
    mpowel01
    Posts: 1,516
    Registered: 12/7/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 10:03 AM in response to: yingkuan Reply
    Scratch the VALUES keyword then make sure that the select list matches the column list in number and type.
    1 insert into marktest
    2 (fld1, fld2, fld3, fld4, fld5)
    3* select * from marktest
    UT1 > /
    16 rows created.
    HTH -- Mark D Powell --
    Jagan
    Posts: 41
    From: Hyderabad
    Registered: 7/21/06
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 10:07 AM in response to: jerrygreat Reply
    try this - just paste the code and give me the error- i mean past the entire error as it is if error occurs
    INSERT INTO xhealthcall_script_data
    (xhc_call_ended, xhc_switch_port, xhc_script_id,
    xhc_fax_specified)
    SELECT TO_DATE (hh_end_date || ' ' || hh_end_time, 'MM/DD/YY HH24:MI:SS'),
    hh_switchport, hh_script, 'N'
    FROM tmp_healthhit_load
    WHERE hh_script != 'BROCHURE'
    UNION
    SELECT TO_DATE (hh_end_date || ' ' || hh_end_time, 'MM/DD/YY HH24:MI:SS'),
    hh_switchport, hh_script, 'N'
    FROM tmp_healthhit_load
    WHERE hh_script != 'BROCHURE';
    Regards
    Jagan
    jerrygreat
    Posts: 8
    Registered: 1/3/07
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 11:31 AM in response to: Jagan Reply
    Hi, Jagan:
    thank you very much for your answer.
    but when I execute it, I still can get error like:
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    so wired, do you have any ideas?
    thank you very much

    And this one,
    Aother question about SQL?
    I thought I already told him to deal with
    ORA-03113: end-of-file on communication channel
    problem first.
    There's nothing wrong (syntax wise) with the query. (of course when no "value" in the insert)

  • What's wrong with my vi

    What's wrong with my VI?
    When i'm using a string control to select on the case structure, my vi  is working as expected. But when i'm using the output of the read visa which outputs exactly the same string as the one i used in control string, the vi is not working as i expect it.
    The output of the read visa string is "HP8593E", an id query from agilent spectrum analyzer.
    thank you for your help..
    JLS
    Solved!
    Go to Solution.

    altenbach wrote:
    crossrulz wrote:
     I recommend using a Trim Whitespace on the string going into your case selector to remove this End Of Line.
    I agree that trim whitespace should be all you need. For good measure, you should also set the case structure for case insensitive matching.
    The instrument's FW has a 50 char buffer for the ID response.  Without knowing the exact FW on the device the ranged case is recommended.   HP has a nasty habit of adding fields where buffers exist (And sometimes even entire alternate language support SCPI) so, a response of "ModelID, FWVER, SER" is to be expected in later FW  "HP8593E..HP8593E\FF" permits this flexibility.  (Especially since the instrument is obsolete and you don't know what FW is on the next device you can buy.)   It may cost just a bit in performace Really? a nanosecond or two for each ID?  we don't ID? the device a million times, it will not impact test cycle time.  Yes a Case insensitive match would be perfered.  Match pattern may be better.
    Its not all that often I would disagree with the two of you...But in this instance
    Jeff

Maybe you are looking for

  • After updating Firefox to version 16.0.1, it no longer works in conjunction with "Proxifier"...

    Hi, I'm using Firefox on Windows XP professional x64 SP2. I also use a program called "Proxifier" which directs all traffic from my computer to the Internet and vice versa through a proxy server and does the name resolution through proxy DNS not syst

  • How to read file on demand (or) avoid polling in bpel 11g?

    Hello - Scenario - Receive two files(A & B) which should end up in two tables (Header, Lines) BPEL process - 1) Receive acitivity - To Read file (A) via File adapter 2) Tranformed 3) Invoked the Db adapter to insert into "Header" table 4) Added anoth

  • Urgent - Big POC: SAP Adapter Java API !

    Hi, I'm trying to get from an SAP BAPPI values using SAP Adapter Java API. I had tested at BEA and it worked fine. the code is: try { InitialContext ic = new InitialContext(env); // Create an object that provides the services established during confi

  • PDF's missing random words

    I'm a college student who uses Safari to do alot of online readings for classes. I've looked through many of these threads but haven't found anyone with this same problem. At times when I'm using preview to look at pdf's, words will just randomly be

  • Load xml data into oracle table

    Hi, How to load the xml data in to oracle table plz guide in this context thanks