REGEXP_LIKE not returning expected results

My first attempt at REGEXP_LIKE and I'm obviously missing something. I've tried several suggestions I found in the forum but cannot get the correct results. I need the following query to return only those rows containing only alphabetic characters (no numbers). What I get are rows containing letters and numbers.
Any help will be greatly appreciated!
Randy
SELECT order_number
FROM order_table
where REGEXP_LIKE(order_number,'[a-z A-Z]')

check below the various options which you can use to search different elements
Character Class   Syntax Meaning
[:alnum:]             All alphanumeric characters
[:alpha:]              All alphabetic characters
[:blank:]              All blank space characters
[:cntrl:]                All control characters (nonprinting)
[:digit:]                All numeric digits
[:graph:]             All [:punct:], [:upper:], [:lower:], and [:digit:] characters
[:lower:]              All lowercase alphabetic characters
[:print:]               All printable characters
[:punct:]              All punctuation characters
[:space:]             All space characters (nonprinting)
[:upper:]             All uppercase alphabetic characters
[:xdigit:]              All valid hexadecimal characters

Similar Messages

  • Ctxrule - match does not return expected result

    v.11.1.07 - I have created a ctxrule index as detailed below. However, although a query should match on the given document, it does not return. Any ideas?
    begin
    ctx_ddl.create_preference('ot_lexer', 'basic_lexer');
    ctx_ddl.set_attribute('ot_lexer', 'index_stems', 'ENGLOSH');
    end;
    begin
    ctx_ddl.create_section_group('ot_sec_group', 'auto_section_group');
    end;
    create table ot_profile_test
    (profile_id number,
    query clob);
    create index ot_profile_rule_ndx on ot_profile_test(query)
    indextype is ctxsys.ctxrule parameters
    ('stoplist ctxsys.empty_stoplist
    section group ot_sec_group
    lexer ot_lexer');
    insert into ot_profile_test values(1, '($apple and $pear) and (1 within food)');
    commit;
    exec ctxsys.ctx_adm.set_parameter('log_directory', '/yourdir');
    exec ctx_output.start_log('ot');
    exec ctx_output.add_event(ctx_output.event_index_print_rowid);
    exec ctx_output.add_event(ctx_output.event_index_print_token);
    exec ctx_ddl.sync_index('ot_profile_rule_ndx', '2040M', null, 1, null, ctx_ddl.lock_nowait_error);
    exec ctx_output.end_log;Then, run a query:
    declare
    a clob := 'apple orange pears banana
    <metadata>
    <indicators>
       <food>1</food>
    </indicators>
    </metadata>
    vn_profile_id number;
    begin
    select profile_id into vn_profile_id
    from ot_profile_test
    where matches(query, a) > 0;
    dbms_output.put_line(vn_profile_id);
    end;
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 8Shouldn't profile_id = 1 be returned?
    Also, shouldn't the logfile have 2 rows written to $I?
    WRITING TOKEN APPLE:((PEAR) = (PEARS)) * ((1) WITHIN FOOD),0
    WRITING TOKEN APPLES:((PEAR) = (PEARS)) * ((1) WITHIN FOOD),0

    You need to use a basic_wordlist instead of a basic_lexer and ENGLISH instead of ENGLOSH in order to use stemming and your clob (variable a) must be valid html or xml in order to search within sections. Please see the simplified demonstration below.
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_preference ('ot_wordlist', 'basic_wordlist');
      3    ctx_ddl.set_attribute ('ot_wordlist', 'stemmer', 'ENGLISH');
      4    ctx_ddl.create_section_group ('ot_sec_group', 'auto_section_group');
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> create table ot_profile_test
      2    (profile_id  number,
      3       query         clob)
      4  /
    Table created.
    SCOTT@orcl_11gR2> create index ot_profile_rule_ndx
      2  on ot_profile_test (query)
      3  indextype is ctxsys.ctxrule
      4  parameters
      5    ('stoplist     ctxsys.empty_stoplist
      6        wordlist     ot_wordlist
      7        section group     ot_sec_group')
      8  /
    Index created.
    SCOTT@orcl_11gR2> insert into ot_profile_test values
      2    (1, '($apple and $pear) and (1 within food)')
      3  /
    1 row created.
    SCOTT@orcl_11gR2> commit
      2  /
    Commit complete.
    SCOTT@orcl_11gR2> exec ctx_ddl.sync_index ('ot_profile_rule_ndx')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> declare
      2    a clob :=
      3        '<table>
      4           <fruits>apple orange pears banana</fruits>
      5           <metadata>
      6             <indicators>
      7            <food>1</food>
      8             </indicators>
      9           </metadata>
    10         </table>';
    11  begin
    12    for r in
    13        (select profile_id
    14         from      ot_profile_test
    15         where  matches (query, a) > 0
    16         order  by profile_id)
    17    loop
    18        dbms_output.put_line (r.profile_id);
    19    end loop;
    20  end;
    21  /
    1
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2>

  • BAPI_ALM_ORDERHEAD_GET_LIST by CREATE_DATE does not return expected result.

    Hi,
    I am trying to retrieve an Order I have manually created on an ECC6.0 system with Order ID 816149.
    I can retrive the order fine using BAPI_ALM_ORDER_GET_DETAIL passig in the Order ID.
    However, if I use BAPI_ALM_ORDERHEAD_GET_LIST with IT_RANGE set on the ENTER_DATE criteria, I get a bunch of Orders back from the search but not mine. However, the creation date of my Order is within the search range. I suspect the problem might be the System Status of my order (but I am just guessing) which is CRTD MANC NMAT NTUP. The User Status is CRTD though, so I am a bit puzzled as to why my order is not in the returned result set. For instance Order 816148 (created by someone else) is returned and it looks very similar to mine (except for the status).
    If any help from SAP people, I am using an ICC Test system so maybe you can have a look for yourself. My system is CF5 / cpcf501 / 05 client 800.
    Cheers.
    JR

    Please pass
    Exporting
    DISPLAY_PARAMETERS
    CALL FUNCTION 'BAPI_ALM_ORDERHEAD_GET_LIST'
    EXPORTING
       DISPLAY_PARAMETERS       =
    " IMPORTING
    "   NAVIGATION_DATA          =
      TABLES
        IT_RANGES                =
        ET_RESULT                =
    "   ET_TEMPLATE              =
        RETURN                   =
    Regards,
    Lalit Mohan Gupta.

  • Search with multiple words not returning expected results

    I am using RoboHelp 9 and was performing my search on published WebHelp.
    In the Help there is a topic named "Port and Path Connection States" which references a status of "port not started".
    When I search for "port not started" (with quotes) the topic is returned.
    When I search for "port not started" (without quotes), I get this message: "The words you typed is not a valid expression.".
    I thought this search would be treated as an OR search, and I would get results for all topics that contained the word "port" or "not" or "started", but instead the expression is not valid. Can anyone tell me why? 

    Check your list of Stop words. It may include NOT.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Refresh using alias table not returning expected results

    I am getting some unexpected results in SmartView and can't figure out the cause. I have an Essbase cube that has two alias tables: the "default" and one that I call "Short Descr". I can consistently bring back data using "none" and "default", but not "Short Descr". When I use "Short Descr" data will come back for some of the members, but not for others.
    Here is an example of a query using "none" as the alias table:
         Net Income      
         RD10078      
         Y-T-D(MAR)      
    PRJG939306      20,372.05      
    PRJLG921508      (26.42)     
    Project      (1,179,752.36)     
    If I change the alias table to "Short Descr", I get the following results:
         Net Income      
         ITA (RD10078)      
         Y-T-D(MAR)      
    PRJG939306 (PRJG939306)      20,372.05      
    PRJLG921508 (PRJLG921508)      (26.42)     
    Project      (1,179,752.36)     
    But then if I just clear the amounts, and do a refresh, I get the following:
         Net Income      
         ITA (RD10078)      
         Y-T-D(MAR)      
    PRJG939306 (PRJG939306)           
    PRJLG921508 (PRJLG921508)      (26.42)     
    Project      (1,179,752.36)     
    And if I pivot Net Income, I get a message that "Any comments/ functions/ formulas on the sheet will be lost.", and the PRJG939306 member is lost.
              ITA (RD10078)      
              Y-T-D(MAR)      
    Net Income      PRJLG921508 (PRJLG921508)      (26.42)     
    Net Income      Project      (1,179,752.36)     
    I can't figure out why it would start treating it as a comment. It looks to be a valid member name and I don't see anything strange if I look at the member properties in EAS. And what I really don't understand is why it would bring back the member name (with alias) and a data value when I change the alias table from "none" to "Short Descr", but not bring back a value when I just clear the amounts and do a Refresh. And why is it only doing it for some of the members and not all of them?
    What could cause this type of behavior?

    lets see if I can say this clearly. Smartview will noit convert from one alias to another. Before switching alias tables, try changing back to no alias and do a retrieve, then switch to the new alias table and retrieve. I think the problem is Smartview is not interpeting what is on the one line so it leave it blank as an unknown member.

  • Avoid JDBC sender error: Execute statement did not return a result set

    Hi!
    My JDBC sender adapter towards MS SQL server works fine, with an Execute statement calling a stored procedure that returns the source data needed. The stored procedure itself updates the status of database table records, so that only the unread records are returned each time the stored procedure is called.
    However, the communication channel monitoring sets a red flag for the JDBC sender adapter, when there are no values to fetch from the database table (using the stored procedure). Message says: "Database-level error reported by JDBC driver while executing statement 'EXECUTE FetchMessage 1, 9000'. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.'. For details, contact your database server vendor."
    This is not an error situation, as I do not expect there to be any values to fetch from the database at all times.
    I do not see how to change the stored procedure to avoid this error.
    Is there a parameter to be set on the JDBC adapter that I can use, so the red flag is avoided?
    Thanks for any input!
    Regards,
    Oeystein Emhjellen

    Hi Oeystein Emhjellen.
    The problem is Store Procedure that has to generate always a ResultSet (or cursor). If it doesn't have a output, you have to generate an Empty ResultSet.
    Like a SELECT Statement:
    If there are data, SELECT get an output result but if it get nothing the SELECT Statement get a empty ResultSet.
    Ask to your database team.
    I hope it helps you.
    Bruno.

  • Bing based federated result sources not returning any results for non-English languages

    I have a result source with this query:
    http://www.bing.com/search?q={?searchterms}  language:fr site:msdn.microsoft.com&format=rss&count=50&first={startIndex}
    This used to give me 40-50 results for common terms like download, blog etc.
    From today (7/14) IST, this source does not return any results. There are no results if I execute this query directly in IE either.
    Same behavior observed for: language:es, language:de etc.
    I do however get results as expected for language:en.
    Any idea what the issue might be?

    Hi Swapnil,
    According to your description, my understanding is that no results returned when searching with non-English in the Result Source query.
    I tested the same scenario per your post and I got the same results as you got.
    I recommend to change the language:fr in the Result Source query to be lang=fr to see if the issue still occurs.
    More references:
    http://kbdump.com/sharepoint-2013-opensearch-search-twitter-facebook-wikipedia-page/
    http://richardstk.com/2013/11/08/sharepoint-2013-federated-search-to-bing/
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Xquery does not return any results on 10.2.0.4, does work on 10.2.0.5

    I have a Xquery statement that works as expected on Oracle 10.2.0.5 but does not return any results on Oracle 10.2.0.4.
    Is this the result of a badly written query? A bug in 10.2.0.4?
    Is there a way to rewrite the query so that is does work on 10.2.0.4?
    Testcode:
    declare
       l_xml xmltype;
       -- Select layers with TileMatrixSet EPSG:28992
       cursor c_layer(p_xml xmltype) is
          select t.*
            from xmltable(xmlnamespaces(default 'http://www.opengis.net/wmts/1.0'
                                       ,'http://www.opengis.net/ows/1.1' as "ows"
                                        ,'http://schemas.opengis.net/gml' as "gml"
                                        ,'http://www.w3.org/1999/xlink' as "xlink"
                                        ,'http://www.w3.org/2001/XMLSchema-instance' as "xsi")
                          ,'for $d in //Layer[TileMatrixSetLink/TileMatrixSet="EPSG:28992"] return $d' passing
                          p_xml columns title varchar2(100) path 'ows:Title'
                          ,format varchar2(100) path 'Format'
                          ,style xmltype path 'Style') as t;
    begin
       l_xml := xmltype.createxml('<?xml version="1.0" encoding="UTF-8"?>
    <Capabilities xmlns="http://www.opengis.net/wmts/1.0"
    xmlns:ows="http://www.opengis.net/ows/1.1"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd"
    version="1.0.0">
    <Contents>
      <Layer>
        <ows:Title>brtachtergrondkaart</ows:Title>
        <ows:Identifier>brtachtergrondkaart</ows:Identifier>
        <Style isDefault="true">
          <ows:Identifier>_null</ows:Identifier>
        </Style>
        <Format>image/png8</Format>
        <TileMatrixSetLink>      <TileMatrixSet>EPSG:28992</TileMatrixSet>
        </TileMatrixSetLink>  </Layer>
      <Layer>
        <ows:Title>top10nl</ows:Title>
        <ows:Identifier>top10nl</ows:Identifier>
        <Style isDefault="true">
          <ows:Identifier>_null</ows:Identifier>
        </Style>
        <Format>image/png8</Format>
        <TileMatrixSetLink>      <TileMatrixSet>EPSG:28992</TileMatrixSet>
        </TileMatrixSetLink>  </Layer>
      <Layer>
        <ows:Title>bgt</ows:Title>
        <ows:Identifier>bgt</ows:Identifier>
        <Style isDefault="true">
          <ows:Identifier>_null</ows:Identifier>
        </Style>
        <Format>image/png8</Format>
        <TileMatrixSetLink>      <TileMatrixSet>EPSG:28992</TileMatrixSet>
        </TileMatrixSetLink>  </Layer>
    </Contents>
    </Capabilities>');
       for r_layer in c_layer(l_xml)
       loop
          dbms_output.put_line(r_layer.title);
       end loop;
    end;Result on 10.2.0.5:
    brtachtergrondkaart
    top10nl
    bgt

    This one's strange indeed.
    I can reproduce on 10.2.0.4 and one of the following seems to fix it :
    1) Specifying the column list in the SELECT, instead of t.* :
       -- Select layers with TileMatrixSet EPSG:28992
       cursor c_layer(p_xml xmltype) is
          select t.title, t.format, t.style
            from xmltable(or,
    2) Using an extended FLWOR expression :
    for $d in //Layer
    where $d/TileMatrixSetLink/TileMatrixSet = "EPSG:28992"
    return $dMaybe you've already noticed but the problem only occurs within a PL/SQL context.
    The same query run from SQL is OK.

  • SDO_RELATE does not return expected points

    Hi,
    I have a problem with a query which does not return the results I am expecting. I think it may be to do with geodetic data v projected data but fail to see how.
    the table points2 contains point data stored in Lat Long (SRID 8307)
    Here is my query:
    SELECT mdsys.sdo_cs.transform(points2.assetextent,26943) FROM points2
    WHERE SDO_RELATE (points2.ASSETEXTENT, MDSYS.SDO_GEOMETRY(2003,26943 ,NULL, mdsys.SDO_ELEM_INFO_ARRAY(1,1003,3), mdsys.SDO_ORDINATE_ARRAY(1831679.1743184,644380.053168771,1831699.1743184,645000.053168677)),'mask=anyinteract') = 'TRUE';
    This query returns 0 results. if perform the same query with SDO_FILTER rather than SDO_RELATE then I get 1 result (which is what I expect). the result is this:
    MDSYS.SDO_CS.TRANSFORM(POINTS2.ASSETEXTENT,26943)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
    SDO_GEOMETRY(3001, 26943, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 1), SDO_ORDINATE_ARRAY(1831689.17, 644440.053, 0))
    1 row selected.
    As can clearly be seen from this result the point is 10m from the both vertical edges of the optimised rectangle and at least 60m from the horizontal edges.
    The sdo_geom_metadata_table entry for this table is:
    SDO_OWNER SDO_TABLE_NAME
    SDO_COLUMN_NAME
    SDO_DIMINFO(SDO_DIMNAME, SDO_LB, SDO_UB, SDO_TOLERANCE)
    SDO_SRID
    VST POINTS2
    ASSETEXTENT
    SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -180, 180, .005), SDO_DIM_ELEMENT('Y', -90, 90, .005), SDO_DIM_ELEMENT('Z', -999, 5000, .005))
    8307
    Anyone got any pointers? If you need more info just let me know
    Sam

    hi,
    can you try this query and let us know what you get ?
    Transform the geometry to 8307 and pass it into the sdo_relate
    operator.
    SELECT mdsys.sdo_cs.transform(points2.assetextent,26943) FROM points2
    WHERE SDO_RELATE (points2.ASSETEXTENT,
    sdo_cs.transform(MDSYS.SDO_GEOMETRY(2003,26943 ,NULL, mdsys.SDO_ELEM_INFO_ARRAY(1,1003,3), mdsys.SDO_ORDINATE_ARRAY(1831679.1743184,644380.053168771,
    1831699.1743184,645000.053168677)), 8307), 'mask=anyinteract') = 'TRUE';

  • Basic NOT EXISTS query not returning any results

    DB Version: 10gR2
    One of our tables in the test schema is having less number of columns than the PROD shema.
    To determine which are missing columns in this table in Test schema i did the following.
    -----In Test Schema
    CREATE TABLE XYZ2
    (COL1 NUMBER);        ----------only one column
    SQL > CREATE TABLE tables_test_list AS SELECT TABLE_NAME,COLUMN_NAME FROM USER_TAB_COLS;
    Table created.--- In the prod schema
    SQL> CREATE TABLE XYZ2
      2  (COL1 NUMBER,
      3  COL2 NUMBER       ----------- same table name with an extra column
      4  );
    Table createdAnd from the PROD schema i execute the following SQL to determine what are the columns that are missing in the TEST schema
    select column_name from User_Tab_Cols  outer
    where table_name='XYZ2'
    and not exists (select 1 from TEST_SCHEMA.tables_test_list inner where outer.TABLE_NAME=inner.TABLE_NAME )But the above query is not returning any results. Any idea why?

    Actually, the example from the link I posted earlier:
    [email protected]> (
      2  select 'IN T1, NOT T2', column_name,data_type,data_length
      3    from user_tab_columns
      4   where table_name = 'T1'
      5  MINUS
      6  select 'IN T1, NOT T2', column_name,data_type,data_length
      7    from user_tab_columns
      8   where table_name = 'T2'
      9  )
    10  UNION ALL
    11  (
    12  select 'IN T2, NOT T1', column_name,data_type,data_length
    13    from user_tab_columns
    14   where table_name = 'T2'
    15  MINUS
    16  select 'IN T2, NOT T1', column_name,data_type,data_length
    17    from user_tab_columns
    18   where table_name = 'T1'
    19  )
    20  /

  • Table-Valued Function not returning any results

    ALTER FUNCTION [dbo].[fGetVendorInfo]
    @VendorAddr char(30),
    @RemitAddr char(100),
    @PmntAddr char(100)
    RETURNS
    @VendorInfo TABLE
    vengroup char(25),
    vendnum char(9),
    remit char(10),
    payment char(10)
    AS
    BEGIN
    insert into @VendorInfo (vengroup,vendnum)
    select ks183, ks178
    from hsi.keysetdata115
    where ks184 like ltrim(@VendorAddr) + '%'
    update @VendorInfo
    set remit = r.remit
    from
    @VendorInfo ven
    INNER JOIN
    (Select ksd.ks188 as remit, ksd.ks183 as vengroup, ksd.ks178 as vendnum
    from hsi.keysetdata117 ksd
    inner join @VendorInfo ven
    on ven.vengroup = ksd.ks183 and ven.vendnum = ksd.ks178
    where ksd.ks192 like ltrim(@RemitAddr) + '%'
    and ks189 = 'R') r
    on ven.vengroup = r.vengroup and ven.vendnum = r.vendnum
    update @VendorInfo
    set payment = p.payment
    from
    @VendorInfo ven
    INNER JOIN
    (Select ksd.ks188 as payment, ksd.ks183 as vengroup, ksd.ks178 as vendnum
    from hsi.keysetdata117 ksd
    inner join @VendorInfo ven
    on ven.vengroup = ksd.ks183 and ven.vendnum = ksd.ks178
    where ksd.ks192 like ltrim(@PmntAddr) + '%'
    and ks189 = 'P') p
    on ven.vengroup = p.vengroup and ven.vendnum = p.vendnum
    RETURN
    END
    GO
    Hi all,
    I'm having an issue where my Table-Valued Function is not returning any results.
    When I break it out into a select statement (creating a table, and replacing the passed in parameters with the actual values) it works fine, but with passing in the same exact values (copy and pasted them) it just retuns an empty table.
    The odd thing is I could have SWORN this worked on Friday, but not 100% sure.
    The attached code is my function.
    Here is how I'm calling it:
    SELECT * from dbo.fGetVendorInfo('AUDIO DIGEST', '123 SESAME ST', 'TOP OF OAK MOUNTAIN')
    I tried removing the "+ '%'" and passing it in, but it doesn't work.
    Like I said if I break it out and run it as T-SQL, it works just fine.
    Any assistance would be appreciated.

    Why did you use a proprietary user function instead of a VIEW?  I know the answer is that your mindset does not use sets. You want procedural code. In fact, I see you use an “f-” prefix to mimic the old FORTRAN II convention for in-line functions! 
    Did you know that the old Sybase UPDATE.. FROM.. syntax does not work? It gives the wrong answers! Google it. 
    Your data element names make no sense. What is “KSD.ks188”?? Well, it is a “payment_<something>”, “KSD.ks183” is “vendor_group” and “KSD.ks178” is “vendor_nbr” in your magical world where names mean different things from table to table! 
    An SQL programmer might have a VIEW with the information, something like:
    CREATE VIEW Vendor_Addresses
    AS
    SELECT vendor_group, vendor_nbr, vendor_addr, remit_addr, pmnt_addr
      FROM ..
     WHERE ..;
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • cm:search is not returning any result when logical operator '!' is used.

    <cm:search is not returning any result when logical operator '!' is used.
    I am using BEA 9.1 content management services API. When I run the following query I am not receiving any results. Also no error or exceptions are seen in the weblogic or cmspi log.
    The query is <cm:search id="docs" query="!(object_name like 'Sport*')" />

    HI cam 
    Thanks for your reply, but i found the problem it was because my server administrator password has changed by network guys... and because of it crawler unable to access the content 
    I wrote my solution here i hope it will help other people 
    http://bvs-sharepoint.blogspot.com/2015/03/sharepoint-search-is-not-returning.html
    RB

  • The statement did not return a result set in ireport

    Hi,
        I am Building a Report in iReport(Jasper Reports). I called a stored procedure from iReport by passing a parameter in Query Editor. I am getting an exception saying "The statement did not return a result set". When
    i use Temp Tables in stored procedure i am getting the exception.
    If there is no temptable in Stored procedure there wont be any exception.
    This is my Stored procedure
    Create PROCEDURE [XUSP_REPORT_SOPRINT] @BNUM VARCHAR(20) AS
    BEGIN
    DECLARE @FQTY BIGINT
    DECLARE @ITNAME VARCHAR(100)
    DECLARE @COUNT INT=0
    DECLARE @COUNT1 INT=0
    CREATE TABLE #BILL_PRINT(
        [BNUM] [varchar](20) NOT NULL,
        [CNAME] [varchar](30) NOT NULL,
        [CNUM] [int] NOT NULL,
        [ITNAME] [varchar](100) NOT NULL,
        [ITEM#] [int] NOT NULL,
        [QTY] [int] NOT NULL DEFAULT 0,
        [UNIT] [varchar](5) NOT NULL,
        [PRICE] [float] NOT NULL DEFAULT 0,
        [BASIC] [float] NOT NULL DEFAULT 0,
        [DISCOUNT] [float] NOT NULL DEFAULT 0,
        [FRQTY] [int] NOT NULL DEFAULT 0,
        [BADDR] [varchar](300) NULL,
        [CADDR] [varchar](300) NOT NULL,
        [BDATE] [datetime] NULL DEFAULT (sysdatetime()),
        [BILLBY] [varchar](50) NOT NULL,
        [ROUTE] [varchar](200) NULL,
        [AMT] [float] NOT NULL DEFAULT 0,
        [VAT] [float] NOT NULL DEFAULT 0,
        [VAT AMT] [float] NOT NULL DEFAULT 0,
        [AMT_AF_DISC] [float] NOT NULL DEFAULT 0,
        [AMT_AF_VAT] [float] NOT NULL DEFAULT 0,
        [TOT_DISC] [float] NOT NULL DEFAULT 0,
        [ROUND_OFF] [float] NOT NULL DEFAULT 0,
        [TOT_VAT] [float] NOT NULL DEFAULT 0,
        [AMT_UNDER_VAT] [float] NOT NULL DEFAULT 0,
        [NETT] [float] NOT NULL DEFAULT 0,
        [TOS] [varchar](30) NULL DEFAULT 0,
        [CDISC] [float] NOT NULL DEFAULT 0,
        [SDISC] [float] NOT NULL DEFAULT 0
    insert into #BILL_PRINT SELECT [BNUM]
          ,[CNAME]
          ,[CNUM]
          ,[ITNAME]
          ,[ITEM#]
          ,[QTY]
          ,[UNIT]
          ,[PRICE]
          ,[BASIC]
          ,[DISCOUNT]
          ,[FRQTY]
          ,[BADDR]
          ,[CADDR]
          ,[BDATE]
          ,[BILLBY]
          ,[ROUTE]
          ,[AMT]
          ,[VAT]
          ,[VAT AMT]
          ,[AMT_AF_DISC]
          ,[AMT_AF_VAT]
          ,[TOT_DISC]
          ,[ROUND_OFF]
          ,[TOT_VAT]
          ,[AMT_UNDER_VAT]
          ,[NETT]
          ,[TOS]
          ,[CDISC]
          ,[SDISC]
      FROM [SALES_DETAILS] WHERE BNUM=@BNUM
    CREATE TABLE #ITNAME_0
    ITEM VARCHAR(100) NOT NULL,
    FREE BIGINT NOT NULL
    INSERT INTO #ITNAME_0 SELECT ITNAME,FRQTY FROM SALES_DETAILS WHERE FRQTY<>0 AND BNUM=@BNUM
    --SELECT * FROM #ITNAME_0
    SET @COUNT=(SELECT COUNT(*) FROM #ITNAME_0)
    WHILE @COUNT!=0
    BEGIN
    SET @FQTY=(SELECT TOP(1) FREE FROM #ITNAME_0)
    SET @ITNAME=(SELECT TOP(1) ITEM FROM #ITNAME_0)
    SET @COUNT1=(SELECT COUNT(*) FROM #BILL_PRINT WHERE ITNAME=@ITNAME AND BNUM=@BNUM)
    IF @COUNT1=2
    BEGIN
        UPDATE #BILL_PRINT
        SET FRQTY+=@FQTY
        WHERE ITNAME=@ITNAME AND QTY<>0
        DELETE FROM #ITNAME_0 WHERE ITEM=@ITNAME AND FREE=@FQTY
        DELETE FROM #BILL_PRINT WHERE  ITNAME=@ITNAME AND QTY=0
    END
    SET @COUNT=@COUNT-1
    END
    --SELECT *FROM sales_details
    SELECT *FROM #BILL_PRINT where bnum=@bnum
    DROP TABLE #BILL_PRINT
    DROP TABLE #ITNAME_0
    END
    Please help me out in this.
    Thanks,
    Shreyas M

    This is a forum for Reporting Services (SSRS). If you're using Jasper reports then you should be posting in relevenat forums. I'm not sure there would be enough people with Jasper report experience here to help you out!
    Anyways in SSRS when  we use Temp tables in procedure it will throw exception in editor but when you save and run it will still work fine. Did you try saving it and executing report? Did the error still persisted?
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Directory - Org Unit Listing Not Returning Any Results

    Hello Everyone,
    We are using Nakisa v4.1 on EHP7.0 at the moment. In the user interface, Directory > Org Unit Listing is not returning any results while Employee and Position Listings are working just fine.
    What would be the cause ?
    Appreciate your help,
    Kind regards

    Hi,
    I am using a live build copied from SAP_Live_RFC.
    Below you can find what the cds.log says when I try to search an organizational unit.
    2289. 18 Apr 2014 07:05:22 INFO com.nakisa.Logger - ...Request is not required to be verified. For action: setsearch. For processor OrgChartAppEventProcessor
    2290. 18 Apr 2014 07:05:22 INFO com.nakisa.Logger - Invoking action:setsearch [ORGUNIT_NAME, contains, deneme]. For processor OrgChartAppEventProcessor. Against controller OrgChartCtr
    2291. 18 Apr 2014 07:05:22 INFO com.nakisa.Logger - Strings.decodeURIComponent , encoded=deneme , decoded= deneme
    2292. 18 Apr 2014 07:05:22 INFO com.nakisa.Logger - ...Request is not required to be verified. For action: updateNotifications. For processor NotificationsProcessor
    2293. 18 Apr 2014 07:05:22 INFO com.nakisa.Logger - Invoking action:updateNotifications []. For processor NotificationsProcessor. Against controller NotificationsCtr
    2294. 18 Apr 2014 07:05:22 INFO com.nakisa.Logger - updateNotifications on NotificationsProcessor took: 1ms
    2295. 18 Apr 2014 07:05:22 INFO com.nakisa.Logger - FunctionRunner.executeFunctionDirect: /NAKISA/OC_OU_LISTING took: 32ms
    2296. 18 Apr 2014 07:05:22 INFO com.nakisa.Logger - setsearch on OrgChartAppEventProcessor took: 86ms
    2297. 18 Apr 2014 07:05:22 INFO com.nakisa.Logger - com.nakisa.framework.utility.PostRequestActionRegister.callAction(PostRequestAction) : Calling: PostRequestAction [class=com.nakisa.framework.data.commandProcessor.impl.sap.FunctionRunner, method=releaseAllClients]
    2298. 18 Apr 2014 07:05:25 INFO com.nakisa.Logger - ...Request is not required to be verified. For action: setsearch. For processor OrgChartAppEventProcessor
    2299. 18 Apr 2014 07:05:25 INFO com.nakisa.Logger - Invoking action:setsearch [ORGUNIT_NAME, contains, test]. For processor OrgChartAppEventProcessor. Against controller OrgChartCtr
    2300. 18 Apr 2014 07:05:25 INFO com.nakisa.Logger - Strings.decodeURIComponent , encoded=test , decoded= test
    2301. 18 Apr 2014 07:05:25 INFO com.nakisa.Logger - ...Request is not required to be verified. For action: updateNotifications. For processor NotificationsProcessor
    2302. 18 Apr 2014 07:05:25 INFO com.nakisa.Logger - Invoking action:updateNotifications []. For processor NotificationsProcessor. Against controller NotificationsCtr
    2303. 18 Apr 2014 07:05:25 INFO com.nakisa.Logger - FunctionRunner.executeFunctionDirect: /NAKISA/OC_OU_LISTING took: 28ms
    2304. 18 Apr 2014 07:05:25 INFO com.nakisa.Logger - updateNotifications on NotificationsProcessor took: 1ms
    2305. 18 Apr 2014 07:05:25 INFO com.nakisa.Logger - setsearch on OrgChartAppEventProcessor took: 73ms
    2306. 18 Apr 2014 07:05:25 INFO com.nakisa.Logger - com.nakisa.framework.utility.PostRequestActionRegister.callAction(PostRequestAction) : Calling: PostRequestAction [class=com.nakisa.framework.data.commandProcessor.impl.sap.FunctionRunner, method=releaseAllClients]
    2307. 18 Apr 2014 07:05:28 INFO com.nakisa.Logger - ...Request is not required to be verified. For action: setsearch. For processor OrgChartAppEventProcessor
    2308. 18 Apr 2014 07:05:28 INFO com.nakisa.Logger - Invoking action:setsearch [ORGUNIT_NAME, contains, kalite]. For processor OrgChartAppEventProcessor. Against controller OrgChartCtr
    2309. 18 Apr 2014 07:05:28 INFO com.nakisa.Logger - Strings.decodeURIComponent , encoded=kalite , decoded= kalite
    2310. 18 Apr 2014 07:05:28 INFO com.nakisa.Logger - ...Request is not required to be verified. For action: updateNotifications. For processor NotificationsProcessor
    2311. 18 Apr 2014 07:05:28 INFO com.nakisa.Logger - Invoking action:updateNotifications []. For processor NotificationsProcessor. Against controller NotificationsCtr
    2312. 18 Apr 2014 07:05:28 INFO com.nakisa.Logger - updateNotifications on NotificationsProcessor took: 1ms
    2313. 18 Apr 2014 07:05:28 INFO com.nakisa.Logger - FunctionRunner.executeFunctionDirect: /NAKISA/OC_OU_LISTING took: 43ms
    2314. 18 Apr 2014 07:05:28 INFO com.nakisa.Logger - setsearch on OrgChartAppEventProcessor took: 94ms
    2315. 18 Apr 2014 07:05:28 INFO com.nakisa.Logger - com.nakisa.framework.utility.PostRequestActionRegister.callAction(PostRequestAction) : Calling: PostRequestAction [class=com.nakisa.framework.data.commandProcessor.impl.sap.FunctionRunner, method=releaseAllClients]
    Regards.

  • Replenishment - Msg WT134: Store order processing did not return any result

    During the Replenishment run using TCODE: WRP1 following error is being encountered
    <b>Msg WT134: Store order processing did not return any result</b>
    The error is reported when more than 9 articles are being used.

    impelemented the oss note: 979935

Maybe you are looking for

  • Restriction of Selecting Reason for movement based on the movement type

    HI, Defined Reason for movements for the movement types and made the field as " mandatory" in the control reason for the movement type. So, during the Goods movement transaction it becomes mandatory to enter the reason for movement code. But during t

  • Is my headphone jack broken?

    I was just listening to music when I dropped my iphone 4s on to my floor. (It has an otterbox on it). After I picked it up, nothing would play through the headphones. I tried rebooting it, cleaning the headphone jack and I'm going to try to restore i

  • Character encoding in .java file

    If I write a file with: BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("MyClass.java"),"Shift_JIS"));And then compile it with: javac -encoding SJIS MyClass.javaand then load it into a midp application on a mobi

  • Hostname not fully qualified...

    Hi Friends.. I have a small problem with the hostname of my system.I had installed Solaris 10 X86 on Vmware in my windows 2000 system.After booting of my solaris system,if i give check-hostname command it says ,, hostname is not fully qualified ,,cha

  • L_TO_CREATE_DN

    Hi, in my code i have:   SELECT        * FROM lips INTO TABLE tlips WHERE vbeln = likp-vbeln.   IF NOT tlips[] IS INITIAL.     CLEAR: it_delit, l_wa_delit.     REFRESH it_delit.     LOOP AT tlips INTO wa_tlips. Compruebo el estatus de la posición