Query related to MAX limit of VARCHAR2

Hello,
I have run the below PL/SQL block and it gives out the o/p as follows:
DECLARE
  LEN1  NUMBER;
BEGIN
  SELECT LENGTH(RPAD('*', 32760, '*')) INTO LEN1 FROM DUAL;
  DBMS_OUTPUT.PUT_LINE('LEN1: '||LEN1);
END; Output--> LEN1: 4000
But why is it that when i run the same PL/SQL block by assigning the 32K character string to a variable it throws an error -
DECLARE
  LEN1  NUMBER;
  STR   VARCHAR2(32767);
BEGIN
  STR := RPAD('*', 32760, '*');
  SELECT LENGTH(STR) INTO LEN1 FROM DUAL;
  DBMS_OUTPUT.PUT_LINE('LEN1: '||LEN1);
END;  Output-->
ORA-01460: unimplemented or unreasonable conversion requested
ORA-06512: at line 8
I understand that VARCHAR2 has a limit of 4000 chars in SQL and 32767 chars in PL/SQL. If so, why not the second block atleast return 4000 going with this limitation?
Regards,
Sujana

Hi,
Maximum size for VARCHAR2 is 4000. So you cant add 32767 characters to a variable which you have defined with VARCHAR2 datatype.
Below will work
DECLARE
  LEN1  NUMBER;
  STR   VARCHAR2(32767);
BEGIN
  STR := RPAD('*', 4000, '*');
  SELECT LENGTH(STR) INTO LEN1 FROM DUAL;
  DBMS_OUTPUT.PUT_LINE('LEN1: '||LEN1);
END;Thanks,
Suri
Edited by: Suri on Aug 8, 2012 1:50 PM
Edited by: Suri on Aug 8, 2012 1:52 PM

Similar Messages

  • Query related to Max of Data

    I'm working with Database 10g.Scenario as foll. Table T1 - Id,Action,actiondt.data as follows
    ID,action,actiondt
    1,A,11-jan-09
    1,B,12-jan-09
    1,C,13-jan-09
    Query should give me result as foll.
    ID,Action,Max(action)
    1, A, 13-jan-09
    1, B, 13-jan-09
    1, C, 13-jan-09
    How do I achive this in Single query?For each record I want to show max value of actiondt.
    I dont want to use inline query .I want to know whether there is any function which can return this value.
    I can not use GREATEST here.
    I want to use this with Discoverer 3.1
    Rgds

    SQL> with Test_Data as (
      2    select 1 as id, 'A' as action, date '2009-01-11' as actiondt from dual union all
      3    select 1 as id, 'A' as action, date '2009-01-12' as actiondt from dual union all
      4    select 1 as id, 'A' as action, date '2009-01-13' as actiondt from dual
      5  )
      6  select id, action, max(actiondt) over() as Max_action
      7  from test_data;
            ID A MAX_ACTION
             1 A 13.01.2009
             1 A 13.01.2009
             1 A 13.01.2009Regards,
    Dima

  • Hyp FR Error: 5200 : Error executing query.  Exceed max row number 100000

    Hi,
    I am getting the error
    5200 : Error executing query. Exceed max row number 100000
    when I run the report on Financial Reporting. It gives the same error when run on Workspace.
    Have you guys encountered this error before? What are the best ways to tackle it? Help is much appreciated guys.
    -- Adi
    Edit 1 - I tried to simplify the parameters but I still get the same error making me suspect that the issue is not the 100000 row issue.
    Edited by: Aditya26 on Apr 11, 2012 9:02 AM

    Hi Adi,
    This is from My Oracle Support:
    How to Increase Row Limit to Avoid Error "Exceed Max Row Number 100000" [ID 866832.1]
    Modified 23-FEB-2012 Type HOWTO Status PUBLISHED
    In this Document
    Goal
    Solution
    Applies to:
    Hyperion BI+ - Version: 9.3.1.0.00 to 11.1.1.3.00 - Release: 9.3 to 11.1
    Information in this document applies to any platform.
    Goal
    How do you increase the maximum row limit to avoid the error "5200: Error executing query: Exceed max row number 100000"?
    Solution
    1.Edit \Hyperion\common\ADM\<version>\lib\ADM.properties as follows:
    From MAX_ROW_NUMBERS=100000 to MAX_ROW_NUMBERS=500000
    If you are running extremely large reports, you can increase the limit.
    2.Restart Reporting and Analysis services.
    For version 11.1.2.x
    The path of ADM.properties file in these versions should be located under:
    %Oracle_Home%\Middleware\EPMSystem11R1\commo\ADM\11.1.2.0\lib
    Cheers,
    Mehmet

  • Your search query has exceeded  the limit

    Hi All,
    While importing contact more than 1000 contact i get the following error
    "Your server is not configured properly or your search query has exceeded the limit. Please check server configuration"
    How i can increse the max number of contact
    Any advice
    Thanks in advance
    Mariam

    MariamS wrote:
    I am importing contatct through UWC/Communications UWC/CE has a default limit of 1000 entries for the PAB. You can change this limit by setting the lookthru_limit parameter in the /var/opt/SUNWuwc/WEB-INF/config/ldappstore/db_config.properties file and restarting the web-server instance.
    showrev -p | grep uwc
    Patch: 118540-21 Obsoletes: 117287-99, 117819-13, 119156-07 Requires: Incompatibles: Packages: SUNWuwc
    Patch: 118540-42 Obsoletes: 117287-99, 117819-13, 119156-07 Requires: Incompatibles: Packages: SUNWuwc
    Can i know how i can deffrentiate between Messenger Express or UWC and Communications ExpressThe login page for Messenger Express has a title of "Sun Java System Messenger Express".
    Regards,
    Shane.

  • Impdp error number of bytes exceeds limit of varchar2

    Hi,
    I have a problem migration data from one database with western Europe character set to a new database with UTF-8 charter set. I know that this has to do with some characters using more then one byte in UTF character database. But as I have one column varchar2 is configured with 4000 byte as limit and imp reports error as some rows exceeds 4000 and actual requirement is 4009 byte which is not possible as limit of varchar2 is 4000 byte.
    I need to identify the rows that exceed 4000 byte.
    Changing datatype is not an option.
    Anyone have any ideas on how to identify the rows that exceeds 4000 bytes or anyone have a query that makes it possible to query existing environment with all rows above 3980 byte in this one column?
    Regards
    933746

    JohnWatson wrote:
    The csscan Character Set Scanner utility will report all the rows that will be damaged by the character set change (though you'll have to fix them yourself), it is described in the Globalization Support Guide.Thanks I'll look into it.
    I haven't run csscan on this database but ofc on all others :)

  • Query relating to the creation of Managed Service Accounts

    Hi Folks
    I am studying for my 70-411 exam and have a query relating to the creation of Managed Service Accounts.
    I have successfully created an MSA account named 'MSATest' on a DC  using:
     new-adserviceaccount -name msatest –dnshostname home-dc-01 -passthru
    and
     add-AdcomputerServiceAccount -identity home-ap-01 -serviceaccount msatest -passthru
    However the guide that I am using now says that I now need to run:  Install-ADServiceAccount on the host computer in the domain to install the MSA in order to make available it available for use by services.
    So on my member server (home-ap-01) I have installed the Active Directory Module for powershell and ran:
    PS C:\Users\administrator.PCECORP> Install-ADServiceAccount -Identity msatest
    Install-ADServiceAccount : Cannot install service account. Error Message: 'An
    unspecified error has occurred'.
    At line:1 char:1
    + Install-ADServiceAccount -Identity msatest
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : WriteError: (msatest:String) [Install-ADServiceA
       ccount], ADException
        + FullyQualifiedErrorId : InstallADServiceAccount:PerformOperation:Install
       ServiceAcccountFailure,Microsoft.ActiveDirectory.Management.Commands.Insta
      llADServiceAccount
    PS C:\Users\administrator.PCECORP>
    However this errors, Have I misunderstood the purpose of the Install-ADServiceAccount ?  or am I doing something wrong?
    Thanks in advance for you help.

    Try using  -RestrictToSingleComputer parameter when creating service account with New-ADServiceAccount.
    Gleb.
    Hi Gleb
    Thank you for your help, it is appreciated.  That did the trick.
    All the best.

  • Query related to multiple attachments in mail adapter

    Hi,
    I have a query related to multiple attachments in receiver mail adapter.
    I have successfully configured mail related scenarios but now I have another requirement in which I have multiple source files in one directory and I want to send one mail for multiple files as mail attachment using receiver mail adapter. Can anybody help me how to achieve multiple attachments in reciever mail adapter.
    To clarify the requirement more let us take an example
    Ex: I have 5 input files in the source which I pick up using additional files option in the sender file adapter, now I want to send those 5 files into one mail with 5 attachments. Can anybody explain how 5 different payload will be sent as multiple attachments in one mail.
    For your information I used, options like "keep attachments" , some parameters in module processesors etcs...but not able to find out as how exactly it will be achieved.......I dont want to use BPM collect pattern for this.....
    Need your help on this issue. Please suggest the solution as how it can be achieved using receiver mail adapter.
    Thanks & Regards
    Prabhat

    Hi,
    I resolved the issue on my own. Thanks for your help and support.
    Thanks & Regards
    Prabhat

  • Query related to Email adapter

    Hi,
    I have query related to receiver Email adapter. I am able to run a scenario for 2 attachments in receiver mail adapter scenario.
    My scenario is that I am picking up the multiple files using sender file adapter "additonal fiiles" fucntionality and and post the two files as attachments in receiver email adapter. I am picking up two formats: .xml file and PDF and successfully attached to the receiver email adapter.
    My query is is related to Standard module processors sequence.
    For 3 files in mail attachments(.xml , pdf & .txt)  what should be the module processors sequence in receiver email adapter?
    Currently I am using the following module processors sequence
    1     localejbs/AF_Modules/MessageTransformBean                          Local Enterprise Bean     trans2
    2     localejbs/AF_Modules/PayloadSwapBean                          Local Enterprise Bean     swap
    3     localejbs/AF_Modules/MessageTransformBean                          Local Enterprise Bean     trans1
    4     sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean     Local Enterprise Bean     mail
    swap -> swap.keyName -> payload-name
    swap> swap.keyValue> file1
    trans1> Transform.ContentDescription>file1
    trans1> Transform.ContentDisposition>attachment
    trans1> Transform.ContentType>application/pdf;name="file1.pdf"
    trans2>Transform.ContentDescription>file1
    trans2>Transform.ContentDescription>inline
    Can any body tell me what should be the sequence of module processors and the associated parameters so that all formats(.xml , pdf & .txt)  should go as an attachments in the reciever email adapter.
    Thanks & Regards
    Prabhat

    it would be something like this, Try this
    1 localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean swaptxt
    2 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean trans3
    3 localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean swapxml
    4 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean trans2
    5 localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean swappdf
    6 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean trans1
    7 sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
    swapxml -> swap.keyName -> payload-name
    swapxml> swap.keyValue> file2
    swappdf -> swap.keyName -> payload-name
    swappdf> swap.keyValue> file1
    trans1> Transform.ContentDescription>file1
    trans1> Transform.ContentDisposition>attachment
    trans1> Transform.ContentType>application/pdf;name="file1.pdf"
    trans2>Transform.ContentDescription>file2
    trans2>Transform.ContentDisposition>attachment
    trans2> Transform.ContentType>application/xml;name="file2.xml"
    trans3> Transform.ContentDescription>file3
    trans3> Transform.ContentDisposition>attachment
    trans3> Transform.ContentType>application/txt;name="file3.txt"
    mail --> mime.contenttype   --> multipart/mixed
    I have not tried this myself. but it should work

  • Query related to GAL

    Hello All,
    We are in process of implementing Exchange 2013 in our Organization and had a Query related to GAL.
    Below is our Environment description:
    01. We have a Single Forest and Single Domain Architecture.
    02. We will have separate Active Directory Sites for all 3 Regions across Global.
    03. Exchange 2013 will be installed in each region.
    04. In APAC region Exchange 2013 Language pack for Japanese will be installed to support Japanese language.
    Our Requirement:
    ================
    01. When a Japanese User tries to browse GAL all the display names have to be displayed in Japanese language and when a user who resides other Region (Europe or AMERICAS) tries to browse GAL the Address list has to be displayed in default English Language.
    Can someone guide us on how this can be achieved?
    Awaiting for all your suggestions.
    Thanks in advance.
    Thanks & Regards,
    Nagaraj N
    Nagaraj N

    Hi Nagaraj,
    Here are some requirements that I am still not quite sure. Could you please provide more information about it? Such as:
    1. Do you mean one user have two display names: one with Japanese language used for users in Japan, one with English language used for English users? Then we filter address lists with language difference. Based on my knowledge, one email address is generally
    involved for one display name.
    2. If there are both Japanese users and English Language users in the forest, and you just need Japanese users view users whose name is displayed as Japanese language. We can use
    Address book policies (ABPs) to segment users into specific groups to provide customized views of your organization’s global address list (GAL).
    To show different GAL for different users, we can specify the CustomAttribute1-15 property to divide your organizations. For example, we can set the CustomAttribute15 property for Japanese users to
    Japan. Just like:
    Set-Mailbox –Identity JapanUser1 –CustomAttribute15 Japan
    Then we can create global address list for Japanese that includes all of the recipients that exists in the address lists and room address list:
    New-GlobalAddressList -Name "GAL_Japan" -RecipientFilter {(CustomAttribute15 -eq "Japan")}
    For detailed steps about how to create and apply the Address Book Policies, please refer to:
    http://technet.microsoft.com/en-us/library/jj657455(v=exchg.150).aspx
    Hope it helps.
    Regards,
    Winnie Liang
    TechNet Community Support

  • Query related to DataGuard Archicture...

    Hi All,
    I want to implement DataGuard Archicture in my setup, I'hv one query related to different operating system in my setup, I'hv two server one for primary and the other for standby Database with 10g DB R2. In one server having Linux os and the other own has Solaris, so DataGuard will work on different os or both server os should be same? And if I'hv 2 GB then will it be create any prob?
    pl. suggest me.

    A requirement for standby is both databases must be on the same platform and on the same db version, this requirement applies even if you are on a logical or on a physical dataguard database.
    You can verify the Step by Step instructions to create a standby database:
    Step-byStep Instructions for Creating a Logical Standby Database
    Step-by-Step Instructions for Creating a Physical Standby Database
    ~ Madrid

  • Query related to withhold tax

    Hi  Freinds,
    This is mamatha i have a query related to withhold tax .what is diff b/w business place and section code.what is importance of section code.
    Regards
    S Mamatha
    Please, search SDN

    For India, witholding tax, you need to create the business place and section code with the same id.
    Section code is additional field provided by sap for tds related processig, reports etc.
    Regards,
    SDNer

  • Query  related to the transfer of the control to the other controller.

    Hi all,
    I have a query related to the transfer of the control to the other controller.
    I have components A and B .From a view of component A I neeed to open a window which belong to component B.Problem is that ,if I use create_window_for_cmp_usage( ) and the open( ) method and after that there is some code,then that code is getting executed before the window is opening.
    I want that the control should be back to the these code after the window is poped up and  after clossing the window. 
    Eg
    method ONACTIONOPEN_WINDOW .
    DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component  TYPE REF TO if_wd_component.
      DATA lo_window         TYPE REF TO if_wd_window.
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      lo_window         = lo_window_manager->create_window_for_cmp_usage(
                         interface_view_name    = 'ZHELLO_WORLD'
                         component_usage_name   = 'USAGE_HELLO'
                       title                  =
                       close_in_any_case      = abap_true
                         message_display_mode   = if_wd_window=>co_msg_display_mode_selected
      lo_window->open( ).
      data a type i.
      data b type i.
      a = 2.
      b = 3.
      a = a + b.
    endmethod.
    In this case I am calling  ONACTIONOPEN_WINDOW method.But before opening the window the a iscalculated here.I want that after popuping  the window the calculations should be done .
    How will I achieve this.
    Thanks in advance.
    Edited by: vaibhav nirmal on Nov 25, 2008 6:42 AM

    Hi,
    You will have to do your calculation as an event in your new window, or capture the closing of the new window as an event in your currenbt view and do your calculations in the event.
    Regards,
    Shruthi R

  • Query related to User License.

    Hi all,
    I have some query related to User License.
    If we have 250 no of user license( with one developer),
    can we use them individually on DEV, QAS & PRD ?
    can we use them individually on differrent clients?
    what abt users on 000 client. Is they should different license or come under same group.
    Regards,
    shan

    Contact you SAP Account Manager.
    Regards
    Juan

  • Query related to Internal Table

    Hi ,
          I have a small query related to internal table , can we dump millions of records to an internal .
    The actual requirment is like i need to develop a report in BI side where i have to dump records into an internal table  from PSA tables without filtering .
    Can we do so ....
    or do we have any other option to dump the data to an internal tables .
    need some tips on the same .
    Thanks ,
    VInay.

    Hello Vinay,
    I believe the following extract will give you a brief idea on the size limitations for an internal table.......
    Internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. <u><i>The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries.</i></u>
    Hope it proved useful
    Reward if helpful
    Regards
    Byju

  • Query related to OA framework.

    HI all,
    I have one query related to OA framework.
    Query : I have one business requirement to add/update one choice fields on receivables page and base on user input’s I have to add this choice in sql query and want to display result that is controller .( As of now everything is there only I want to add one more choice on page ).
    So I am looking for solution what to do . As I am new in OA framework.
    First of all I want to pull out all files and want to check /modify on my user desktop once it will work normal then I will start modify .
    So for that what I have to do (I have to pull out all files from server ) . ?
    Thanks in advance,
    Raj

    Raj,
    I have already replied that you will find the details for setup in some of the old threads. Its always better to look into old threads for generic issues. If you have got any specific OAF issue, ppl are always here to help you.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Axis adapter : Bad Request error

    Hi, I have a File to SOAP scenario (PI 7.0) where I am using AXIS adapter in the receiver SOAP adapter for NTLM authorisation. In the xml that I am trying to post, i have characters like & because of which I am getting a Bad Request error. Is there a

  • Can someone take some time to answer these interview Qs?

    Hi BW Experts, 1)how many internal tables are there?(or may be internal table types) 2)in ODS settings there is a setting for BEX flag.  what exactly happens behind the scenes when we set that flag? 3)how to improve performance on <b>data loading</b>

  • Dashboard Pages menu in OBIEE

    My requirement is want to show Dashboard Pages menu see below link.. http://i47.tinypic.com/104m42x.png anybody please help me.. Urgent.. Raj

  • Displaying non-legible fonts

    I assume that in the process of organizing font sets I somehow managed to affect Mail. Now the To, From, and Subject titles are using a numerical font set. I can change the message fonts within Preferences>Fonts & Colours, but none of these pref's al

  • Editor of Photoshop Elements 9 will not accept tif file.

    I am wanting to change my tif files to jpegs in order to make a book in Shutterfly.  When I highlight a tif file and to the editor I get a message that this file can not be openned.  What is causing this problem?  and how can I correct it?      Debor