Problem executing SELECT statement due to st_spatial column type

I am using a CachedRowSet and cache.execute() will not run because it does not support the st_spatial column type. I have been told to use the column metadata to build a select statement of column names, and check the column's type before you add it to the select clause. But, I am unsure of what to do since I can't get column names without running a select statement first... I will attach some code for you to look at, but please give me suggestions!
try{
Class.forName("com.informix.jdbc.IfxDriver");
CachedRowSet cache = new CachedRowSet();
cache.setReadOnly(true);
cache.setUrl(dbname);
cache.setUsername(user);
cache.setPassword(password);
cache.setCommand("SELECT * FROM "+table);
try{
cache.execute();
}catch(Exception e){
out.print("Can't Display");
OTHER JSP CODE THAT WORKS WITH THE RESULTS FROM ABOVE
}catch(Exception exc){
out.println(exc.toString());
} // end try-catch

I honestly don't have a clue. I have no idea what the st_spatial data type is, or where it is defined, and as a result, I don't know why Java would be complaining about it. I do know that java.sql.ResultSet doesn't care about it (it would internally recognize it as a plain old object type via the getObject() method and you would have to cast it to st_spatial).
What I would check:
Is the Informix driver up to date?
Does the CachedRowSet class extend ResultSet or otherwise use it as an internal data structure? If so, does it properly create the ResultSetMetaData object and no exceptions are being trapped?
Otherwise... when copying data from the ResultSet object into its own internal data structure, does it correctly realize that the st_spatial column should NOT be copied into a String or a slot in a String array?
Does a quick and dirty command line version of your program properly use CachedRowSet to retrieve at least one record from your database?
Basically, put the JSP aside and just test the CachedRowSet to make sure it is working correctly. I have no idea what's in that class since it is not a Java standard class, so I can't really give you any additional suggestions.

Similar Messages

  • ADF BC : "Attributes selected in query with no column type found! ..."

    hi
    Using JDeveloper 10.1.3.3.0, I have this "Selected in Query" attribute, "Never" updatable, in my Entity Object.
    The Entity Object is based on the SCOTT.EMP table and the attribute, called "BonusInfo", is defined using the expression " '[bonus info ' || (SAL * 2) || ']' ".
    see http://verveja.footsteps.be/~verveja/files/oracle/NoColumnTypeFoundApp-v0.01.zip
    While creating this Entity Object, I got a "Business Components" dialog that says:
    "Column type is not specified for this attribute. Specifying column-type and precision results in better query performance at runtime. Do you wish to set column type to VARCHAR2(255)?"
    I clicked "Yes".
    I also created two View Objects based on this Entity Object.
    In the "Create View Object" wizard "Step 4 of 7: Attribute Settings" I got a "Business Components" diaglog that says:
    "Attributes selected in query with no column type found! Specifying column-type and precision results in better query performance at runtime. Do you wish to set default column type for these attributes?"
    I clicked "Yes".
    Testing the query in "Step 5 of 7: SQL Statement" showed "Query is valid.".
    question:
    Why do I keep getting the message ...
    "Attributes selected in query with no column type found! Specifying column-type and precision results in better query performance at runtime. Do you wish to set default column type for these attributes?"
    ... in the View Object Editor if I click on different attributes?
    (I don't get such a message the first time I click on an attribute after opening the View Object Editor, but after that it keeps popping up each time I click on a different attribute, no matter what I answer "Yes", "No" or "Cancel".)
    many thanks
    Jan Vervecken

    Jan,
    BC needs the column type and precision so that we can allocate the correct JDBC buffer size; otherwise we would just allocate 2k per string.
    Blaise

  • Attributes selected in query with no column type found! (solved)

    Dear JHeadstart Team,
    In the view object Editor I have two entity based attributes attrib1 and attrib2
    both with type Number. Both have aliases with type number(9,0)
    If attrib1 is null I want to have the value of attrib2.
    In the expression box I put: nvl(attrib1,attrib2)
    When I press the ok button I get the next error message.
    "Attributes selected in query with no column type found!
    Specifying column-type and precision results in better query performance at runtime.
    Do you wish to set default column type for these attributes? "
    When I say ok I get the next message:
    "An error occurred. Unable to apply all the wizard changes.
    Column type cannot be changed for Entity based attribute.
    Exception: oracle.jbo.dt.objects.JboExeption."
    The details button serves no extra information.
    Since both the attributes have the same type I thought the nvl commando should work.
    But what does the "no column type found" sentence mean?
    regards,
    Marcel.
    Message was edited by:
    user571204

    Thanks Jan,
    You've put me on the right track.
    I found out that this is only possible in the entity object class.
    So I have to check my limited java skills.

  • Limitation on SQL executing select statement from ADO and Oracle 8.1.7.1 OleDB Driver

    Hi,
    we are running a query with a big dunamic select statement from VB code using ADO command object. When Execute method is called system hangs and control won't return back to the application. it seems to be that there is some type limitation on Query string length. Please tell us if there is any?
    we are running Oracle 8.1.7 Server on Windows 200 Server and connecting from a W2K professional, ADO 2.6 and Oracle OLEDB 8.1.7.1 OLEDB Driver.
    Sample code:
    Dim rs As ADODB.Recordset
    Dim cmd As ADODB.Command
    Set cmd = New Command
    With cmd
    .CommandText = ' some text with more than 2500 characters
    .CommandType = adCmdText
    Set rs = .Execute
    End With
    when i debug using VB6 and when .Execute line is called system hangs or return a message method <<somemethod> of <<some class name>> failed error.
    Any help is appreciated.
    Thanks,
    Anil

    A stored procedure would only slow you down here if it was poorly written. I suspect you want to use the translate function. I'm cutting & pasting examples from the documentation-- a search at tahiti.oracle.com will give you all the info you'll need.
    Examples
    The following statement translates a license number. All letters 'ABC...Z' are translated to 'X' and all digits '012 . . . 9' are translated to '9':
    SELECT TRANSLATE('2KRW229',
    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
    '9999999999XXXXXXXXXXXXXXXXXXXXXXXXXX') "License"
    FROM DUAL;
    License
    9XXX999
    The following statement returns a license number with the characters removed and the digits remaining:
    SELECT TRANSLATE('2KRW229',
    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', '0123456789')
    "Translate example"
    FROM DUAL;
    Translate example
    2229
    Also, LIKE '%<string>%' is going to be rather expensive simply because it has to compare the entire string and because it forces full table scans, rather than using indexes. You could speed this sort of query up by using interMedia Text (Oracle Text now in 9i). If you can eliminate one of the '%' options, you could also improve things.
    My guess is that your stored procedure is inefficient and that's causing the problem-- 5k rows per table should be pretty trivial.
    If you post your query over on the PL/SQL forum, there are better performance tuners than I that might have more hints for you. To get really good advice, though, you'lllikely have to get at least the execution plan for this statement and may need to do some profiling to identify the problem areas.
    Justin

  • Problem with SELECT statement. What is wrong with it?

    Why is this query....
    <cfquery datasource="manna_premier" name="kit_report">
    SELECT Orders.ID,
           SaleDate,
           Orders.UserID,
        Distributor,
        DealerID,
        Variable,
        TerritoryManager,
        US_Dealers.ID,
           DealerName,
        DealerAddress,
        DealerCity,
        DealerState,
        DealerZIPCode,
        (SELECT SUM(Quantity)
         FROM ProductOrders PO
         WHERE PO.OrderID = Orders.ID) as totalProducts,    
    FROM Orders, US_Dealers
    WHERE US_Dealers.ID = DealerID AND SaleDate BETWEEN #CreateODBCDate(FORM.Start)# AND #CreateODBCDate(FORM.End)# AND Variable = '#Variable#'
    </cfquery>
    giving me this error message...
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
    The error occurred in D:\Inetpub\mannapremier\kit_report2.cfm: line 20
    18 :              WHERE PO.OrderID = Orders.ID) as totalProducts,        
    19 : FROM Orders, US_Dealers
    20 : WHERE US_Dealers.ID = DealerID AND SaleDate BETWEEN #CreateODBCDate(FORM.Start)# AND #CreateODBCDate(FORM.End)# AND Variable = '#Variable#'
    21 : </cfquery>
    22 :
    SQLSTATE
      42000
    SQL
       SELECT Orders.ID, SaleDate, Orders.UserID, Distributor, DealerID, Variable, TerritoryManager, US_Dealers.ID, DealerName, DealerAddress, DealerCity, DealerState, DealerZIPCode, (SELECT SUM(Quantity) FROM ProductOrders PO WHERE PO.OrderID = Orders.ID) as totalProducts, FROM Orders, US_Dealers WHERE US_Dealers.ID = DealerID AND SaleDate BETWEEN {d '2009-10-01'} AND {d '2009-10-31'} AND Variable = 'Chick Days pre-book'
    VENDORERRORCODE
      -3504
    DATASOURCE
      manna_premier
    Resources:
    I copied it from a different template where it works without error...
    <cfquery name="qZVPData" datasource="manna_premier">
    SELECT UserID,
           TMName,
        UserZone,
              (SELECT COUNT(*)
               FROM Sales_Calls
               WHERE Sales_Calls.UserID = u.UserID) as totalCalls,
        (SELECT COUNT(*)
         FROM Orders
         WHERE Orders.UserID = u.UserID) as totalOrders,
        (SELECT SUM(Quantity)
         FROM ProductOrders PO
         WHERE PO.UserID = u.UserID AND PO.NewExisting = 1) as newItems,
        (SELECT SUM(NewExisting)
         FROM  ProductOrders PO_
         WHERE PO_.UserID = u.UserID) as totalNew,
        SUM(totalOrders)/(totalCalls) AS closePerc
    FROM Users u
    WHERE UserZone = 'Central'
    GROUP BY UserZone, UserID, TMName
    </cfquery>
    What is the problem?

    It's hard to say: what's your request timeout set to?
    700-odd records is not much of a fetch for a decent DB, and I would not expect that to case the problem.  But then you're using Access which doesn't fit the description of "decent DB" (or "fit for purpose" or "intended for purpose"), so I guess all bets are off one that one.  If this query is slow when ONE request is asking for it, what is going to happen when it goes live and multiple requests are asking for it, along with all the other queries your site will want to run?  Access is not designed for this.  It will really struggle, and cause your site to run like a dog.  One that died serveral weeks ago.
    What else is on the template?  I presume you're doing something with the query once you fetch it, so could it be that code that's running slowly?  Have you taken any steps to isolate which part of the code is taking so long?
    How does the query perform if you take the subquery out of the select line?  Is there any other way of getting that data?  What subquery will be running once for every row of the result set... not very nice.
    Adam

  • Table or view does not exists error while executing select statement

    Hi,
    I am new to Oracle. I am getting a error while executing the select statement if i give table name without double quotes.
    Ex: Select * from Customer;
    But working fine when the table name is enclosed within a double quotes.
    Ex: Select * from "Customer";
    Is there any way to execute the select statement without the double quotes?
    Actually I am using NHibernate objects for data access.
    Thanks,
    Sai

    Actually I am using NHibernate objects for data access.And probably that's the problem:
    SQL> select * from mytab;
             A
             1
    SQL> select * from mYtAb;
             A
             1
    SQL> select * from MYTAB;
             A
             1
    SQL>  select * from MYTAb;
             A
             1Oracle statements are case insensitive and doesn't require double quotes unless the object names are reserved words.
    As wrote by others if table is created using double quotes it's name bacomes case-sensitive... and this could be the problem...
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/02/05/gestione-degli-errori-in-sql-con-log-errors/]
    Edited by: Massimo Ruocchio on Feb 5, 2010 7:08 PM
    Added last comment..

  • Problem with Select Statements

    Hi All,
    I have a performance problem for my report because of the following statements.
    How can i modify the select statements for improving the performance of the report.
    DATA : shkzg1h  LIKE bsad-shkzg,
             shkzg1s  LIKE bsad-shkzg,
             shkzg2h  LIKE bsad-shkzg,
             shkzg2s  LIKE bsad-shkzg,
             shkzg1hu LIKE bsad-shkzg,
             shkzg1su LIKE bsad-shkzg,
             shkzg2hu LIKE bsad-shkzg,
             shkzg2su LIKE bsad-shkzg,
             kopbal1s  LIKE bsad-dmbtr,
             kopbal2s  LIKE bsad-dmbtr,
             kopbal1h  LIKE bsad-dmbtr,
             kopbal2h  LIKE bsad-dmbtr,
             kopbal1su  LIKE bsad-dmbtr,
             kopbal2su  LIKE bsad-dmbtr,
             kopbal1hu  LIKE bsad-dmbtr,
             kopbal2hu  LIKE bsad-dmbtr.
    *These statements are in LOOP.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg1s , kopbal1s)
          FROM bsid
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'S'
           AND umskz EQ ''
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg1su , kopbal1su)
          FROM bsid
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'S'
           AND umskz IN zspgl
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg1h , kopbal1h)
          FROM bsid
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'H'
           AND umskz EQ ''
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg1hu , kopbal1hu)
          FROM bsid
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'H'
           AND umskz IN zspgl
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg2s , kopbal2s)
          FROM bsad
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'S'
           AND umskz EQ ''
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg2su , kopbal2su)
          FROM bsad
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'S'
           AND umskz IN zspgl
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg2h , kopbal2h)
          FROM bsad
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'H'
           AND umskz EQ ''
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg2hu , kopbal2hu)
          FROM bsad
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'H'
           AND umskz IN zspgl
         GROUP BY shkzg.
        ENDSELECT.

    >
    Siegfried Boes  wrote:
    > Please stop writing answers if you understrand nothing about database SELECTS!
    > All above recommendations are pure nonsense!
    >
    > As always with such questions, you must do an analysis before you ask! The coding itself is perfectly o.k., a SELECT with an aggregate and a GROUP BY can not be changed into a SELECT SINGLE or whatever.
    >
    > But your SELECTS mustr be supported by indexes!
    >
    > Please run SQL Trace, and tell us the results:
    >
    > I see 8 statements, what is the duration and the number of records coming back for each statement?
    > Maybe only one statement is slow.
    >
    > See
    > SQL trace:
    > /people/siegfried.boes/blog/2007/09/05/the-sql-trace-st05-150-quick-and-easy
    >
    >
    > Siegfried
    Nice point there Siegfried. Instead of giving constructive suggestion, people here give a very bad suggestion on using SELECT SINGLE combined with SUM and GROUP BY.
    I hope the person already look at your reply before he try using select single and wondering why he has error.
    Anyway, the most important thing is how many loop expected for those select statements?
    If you have like thousands of loop, you can expect a poor performance.
    So, you should also look at how many times the select statement is called and not only performance for each select statement when you're doing SQL trace.
    Regards,
    Abraham

  • Problem with Select statement.

    DATA: wa_usr05   TYPE usr05.
    The select statement always gives sy-subrc = 0
    even if there is no entry with parid = 'ZRD'.
    On successful it fills the structure wa_usr05 as
    MANDT     C     3      ACC
    BNAME     C     12      SCL
    PARID     C     20      X
    PARVA     C     18
    but mandt is 310.
    USR05 is a pool table and has mandt field.
            SELECT SINGLE bname
                          parid
                          parva
                FROM usr05
                INTO wa_usr05
                WHERE bname = sy-uname AND
                      parid = 'ZRD'    AND
                      parva = 'x'  OR  parva = 'X'.
    Let me know the reason and solution to the problem.

    SELECT SINGLE * FROM usr05
    INTO wa_usr05
    WHERE bname = sy-uname AND
    parid = 'ZRD' AND
    parva = <b>'X'</b> .
    Use single * as u have defined the wa+usr05 as usr05.
    Else.
    DATA: i_usr05 TYPE STANDARD TABLE of usr05.
    SELECT * FROM USR05
             INTO TABLE usr05
             WHERE bname = sy-uname AND
             parid = 'ZRD' AND
            parva = <b>'X'</b> .
    Then loop at itab and write data.
    Hope this solves ur query.
    Reward points if this helps.
    Message was edited by:
            Judith Jessie Selvi

  • Facing problem in select statement dump DBIF_RSQL_INVALID_RSQL CX_SY_OPEN_S

    Hi Experts,
    I  am facing the problem in the select statement where it giving the short dump
    DBIF_RSQL_INVALID_RSQL CX_SY_OPEN_S.
    i have searched many forms, but i found that the select option s_matnr have the limitaion 2000 entreis, but i am passing same s_matnr to other select statement with more than 2000 entries but it is not giving me any short dump.
    but i am facing problem with only one select statement where if i  pass select option s_matnr more than 1500 entris also giving short dump.
    my select statement is
    SELECT * FROM bsim                                       
             INTO CORRESPONDING FIELDS OF TABLE g_t_bsim_lean  
               FOR ALL ENTRIES IN t_bwkey   WHERE  bwkey = t_bwkey-bwkey
                                            AND    matnr IN matnr
                                            AND    bwtar IN bwtar
                                            AND    budat >= datum-low.
    in the internal table g_t_bsim_lean internal table contain all the fields of the table bsim with 2 fields from other table.
    Please let me know whether i need to change the select statement or any other solution for this.
    Regards,
    udupi

    my select query is like this:
    DATA: BEGIN OF t_bwkey OCCURS 0,                          "184465
              bwkey LIKE bsim-bwkey,                            "184465
            END OF t_bwkey.                                     "184465
      LOOP AT g_t_organ          WHERE  keytype  =  c_bwkey.
        MOVE g_t_organ-bwkey     TO  t_bwkey-bwkey.
        COLLECT t_bwkey.                                        "184465
      ENDLOOP.                                                  "184465
      READ TABLE t_bwkey INDEX 1.                               "184465
      CHECK sy-subrc = 0.                                       "184465
      SELECT * FROM bsim                                        "n443935
             INTO CORRESPONDING FIELDS OF TABLE g_t_bsim_lean   "n443935
               FOR ALL ENTRIES IN t_bwkey   WHERE  bwkey = t_bwkey-bwkey
                                            AND    matnr IN matnr
                                            AND    bwtar IN bwtar
                                            AND    budat >= datum-low.

  • Having Problem in select statement.

    Dear gurus
    im having an issue in select statement.
    i have written a select statement which is fetching the result as i required but it takes to much time to execute.
    how to make it work fast.
    SELECT vbak~vkbur vbap~vbeln vbap~posnr vbak~audat
             vbap~kwmeng vbap~meins vbak~kunnr vbak~vkorg
             vbak~vtweg  vbak~spart matnr matkl auart
             vbap~abgru
      INTO CORRESPONDING FIELDS OF TABLE so_tab
      FROM vbak
      JOIN vbap ON vbak~vbeln = vbap~vbeln
      WHERE audat IN in_date
      AND matnr IN matnr
      AND ( auart = 'ZISO' OR auart = 'ZEXP' )
      AND vbap~werks IN werks  .
      SELECT lips~vbeln lips~posnr likp~lfdat lips~lfimg
             lips~meins likp~kunag matnr vgbel vgpos
             lfart
      INTO CORRESPONDING FIELDS OF TABLE del_tab
      FROM likp
      JOIN lips ON likp~vbeln = lips~vbeln
      FOR ALL entries IN so_tab
      WHERE vgbel = so_tab-vbeln
      AND vgpos = so_tab-posnr
      AND lfdat IN in_date
      AND likp~werks IN werks.
    Regards
    Saad Nisar.

    Hi,
    I agree with sabu.
    Along with these you need to do following things -
    SELECT vbak~vkbur vbap~vbeln vbap~posnr vbak~audat
             vbap~kwmeng vbap~meins vbak~kunnr vbak~vkorg
             vbak~vtweg  vbak~spart matnr matkl auart
             vbap~abgru
      INTO CORRESPONDING FIELDS OF TABLE so_tab
      FROM vbak
      JOIN vbap ON vbak~vbeln = vbap~vbeln
      WHERE audat IN in_date
      AND matnr IN matnr
      AND ( auart = 'ZISO' OR auart = 'ZEXP' )
      AND vbap~werks IN werks  .
    {color:green}
    *if sy-subrc eq 0.*
    *so_tab_tmp[]  = so_tab[].*
    *sort so_tab_tmp by vbeln posnr.*
    *delete adjacent duplicates from so_tab_tmp by vbeln posnr.*
    *if so_tab_tmp[] is not initial.*
    {color:green}
      SELECT lips~vbeln lips~posnr likp~lfdat lips~lfimg
             lips~meins likp~kunag matnr vgbel vgpos
             lfart
      INTO CORRESPONDING FIELDS OF TABLE del_tab
      FROM likp
      JOIN lips ON likp~vbeln = lips~vbeln
      FOR ALL entries IN so_tab_tmp
      WHERE vgbel = so_tab_tmp-vbeln
      AND vgpos = so_tab_tmp-posnr
      AND lfdat IN in_date
      AND likp~werks IN werks.
    {color:green}
    *endif.*
    *endif.*
    {color:green}

  • Problem with select statement using Ranges

    Hi Guys,
                   I have used Ranges and used a select statement for selecting those ranges but I am facing a problem.
    RANGES: r_doctyp for EDIDC-DOCTYP.
    r_doctyp-sign = 'I'.
    r_doctyp-option = 'EQ'.
    r_doctyp-low  = 'DEBMAS'.
    append r_doctyp.
    r_doctyp-sign = 'I'.
    r_doctyp-option = 'EQ'.
    r_doctyp-low  = 'MATMAS'.
    append r_doctyp.
    r_doctyp-sign = 'I'.
    r_doctyp-option = 'EQ'.
    r_doctyp-low  = 'PRICAT'.
    append r_doctyp.
    r_doctyp-sign = 'I'.
    r_doctyp-option = 'EQ'.
    r_doctyp-low  = 'ORDERS'.
    append r_doctyp.
    r_doctyp-sign = 'I'.
    r_doctyp-option = 'EQ'.
    r_doctyp-low  = 'INVOIC'.
    append r_doctyp.
    Select DOCNUM                                " IDoc number
           DOCTYP                                " IDoc Type
                 from  EDIDC into table IT_ZEDIDC
                 where CREDAT EQ s_credat-low
                 and   DOCTYP EQ r_doctyp        " IDOC Types
                 and   DIRECT EQ '1'.
    Here my select statement is only taking INVOIC.
    But my statement should take any document type.
    Thanks,
    Prasad.

    Hi...,
    Your following select statement is correct.
    Select DOCNUM                                " IDoc number
                DOCTYP                                " IDoc Type
                from  EDIDC into table IT_ZEDIDC
                where CREDAT IN s_credat
                and   DOCTYP IN r_doctyp        " IDOC Types
                and   DIRECT EQ '1'.
    Why you are not getting result..
    1. structure of the IT_ZEDIDC is having two fields DOCNUM , DOCTYP  with same data lengths. If not it should be...
    2. Order in the database table is must be similer to the order you maintained in the select statement.
    3. As you are hard coding the input ranges make sure about every letter.
    4. take a look at other where condition fields too.
    5. check the table of the ranges in debugging mode.
    6. why can't you declare separate work area and table for ranges...?
      like .... data: r_tab type range of <field>
                 data: wa_tab like line of r_tab.
    7. Use clear work area statement after the append statment.
    --Naveen Inuganti.

  • Executing select statement

    I want to exectue a select statement and show the result retrived in Tabular view(multiple records) how to do it?

    lets assume you want a tabular layout based on table employees in hr-schema:
    1. create a new data-block using datablock-wizard->choose table->choose columns->choose block-name
    2. invoke layout wizard after finishing block-wizard->choose items to show->set prompts->choose tabular layout->set number of records displayed to something>1->finish
    3. Layout editor is opened showing you the generated layout.
    4. Run the forms, query some data (ctrl-f11 or menu)

  • Lexical parameter in select statement showing null or column name in xml tag instead of value

    Hi,
    i am using lexical parameter in report select statement as
    Select &order value from oe_order_headers_all a where order_number ='7889'
    and setting  : order:='a.order_number';  in after parameter form trigger.
    lexical parameter intial value set to null
    when i run this report , its not showing order number in output ,its showing null or a.order_number as text.
    Please help.

    try this
    Select &order data_show
    from oe_order_headers_all
    where order_number ='7889'
    and setting  :order:='order_number';  in after parameter form trigger.
    Hope this helps
    Hamid

  • Where condition problem in select statement.

    Hi,
    I am trying to write select statement as below
      SELECT objectclas objectid FROM cdhdr INTO CORRESPONDING FIELDS OF TABLE ltab_chgdocu
                       WHERE objectclas IN ('STUE' , 'STUE_V')
                       AND   ( TCODE eq 'CS01u2019 or tcode eq u2019CS02u2019 or   tcode eq 'C201' or tcode eq 'C202' ) .
    But I am getting the error like "literals that takes up more than one line or not permitted"
    Please let me know whats wrong and correct me .
    Thanks,
    Vinay.

    Hi Vinay,
    Declare constants
    constants : c_stue type CDOBJECTCL value 'STUE',
                 c_stue_v type CDOBJECTCL value 'STUE_V',
                 c_cs01 type sy-tcode value 'CS01',
                 c_cs02 type sy-tcode value 'CS02',
                 c_C201 type sy-tcode value 'C201',
                 c_C202 type sy-tcode value 'C202'.
    And replace your hardcoded values with these constants in your select query.
    SELECT objectclas objectid FROM cdhdr INTO CORRESPONDING FIELDS OF TABLE it_tab
                                        WHERE objectclas IN (c_STUE , c_STUE_V)
                                                     AND ( TCODE eq c_CS01
                                                     or tcode eq c_CS02
                                                     or  tcode eq c_C201
                                                      or tcode eq c_C202 ).
    Thanks & Regards
    - Always Leaner

  • Problem in executing select statement using hetrogenous services

    I am trying to import data from SqlServer 2005 to oracle 10g using hetrogenous services.
    Oracle is installed on solaris 10 platform. I am running my query by Windows platform using Pl/Sql Developer
    when i run the following query,
    select * from GSecMstr@demodata2;
    i get the following error message
    Error: ORA-04052: error occurred when looking up remote object [email protected]
    ORA-00604: error occurred at recursive SQL level 1
    ORA-07268: szguns: getpwuid error.
    But strange thing is that when i logon to the solaris server machine with user oracle and execute the same command using sqlplus from solaris console, then command is executed successfully

    Server side tnsnames.ora file
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = solaris.ssilhr.com.pk)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    SQLServer =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp)(HOST = solaris.ssilhr.com.pk)(PORT = 1522))
    (CONNECT_DATA =
    (SID = SQLServer)
    (HS = OK)
    Server side sqlnet.ora file
    SQLNET.AUTHENTICATION_SERVICES= (NONE)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    Client side tnsnames.ora file
    # tnsnames.ora Network Configuration File: E:\Oracle\product\10.2.0\db_2\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    ORCL_SUN =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.235)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = orcl)
    Client side sqlnet.ora file
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    Another thing i want to mention is that by mistake, i changed the role of user oracle from dba to root, which i have changed back to dba now.
    To create database link, i used the following SQL
    create public database link DEMODATA2
    connect to "username"
    IDENTIFIED BY "MyPassword"
    using 'SQLServer';

Maybe you are looking for

  • Will the iphone 5 support aws frequency?

    will the upcoming iphone 5 support t-mobile, wind or mobilicity?

  • Infoset query SQ01 preview output display truncated

    Hello Experts, When we are creating an infoset query from SQ01, the preview of output just below the screen is truncated. Example when I select personnel area as output with value and text, the value is only displayed as 1 character and the text 8 ch

  • Facing 'No Approver Found for Purchase Requisition' error when using AME

    Hello All, I am trying to test one simple rule in AME. Below are the the details of the rule. Rule name - VO Category = SUPPLIES.FACILITIES Item Class - Header Rule Type - List Creation Conditions 1. ITEM_CATEGORY in (SUPPLIES.FACILITIES) Condition T

  • OS X Mavericks 10.9 crashes a lot with Logic Pro 9.1.8

    I just upgraded from Mountain Lion 10.8.5 to Mavericks 10.9 via App Store and it went fine, everything is working perfectly even Logic Pro with all the pluggins but it crashes at some points for example when i open reFX Nexus and when i reopen the sa

  • SORT table of type ANY

    Hi,     I've a internal table defined: DATA: <lt_result>  TYPE ANY TABLE. A table name is passed and its structure is assigned to it:   CALL FUNCTION 'TREX_BUILD_COMP_DESCR'     EXPORTING       i_tabname    = lv_tabname     IMPORTING       e_comp_des