Query Rules - length limitation on query conditions set via powershell

My current client has 200 custom keywords in SP 2010 which they would like to migrate to SP 2013 query results.  I have powershell scripts to perform the export from SP 2010 and import into one of three SP 2013 environments.
One limitation I have found in powershell -- that does not happen in the search service application UI! -- is a 100 character length limit on the keywords used for matching query conditions (synonym data in SP 2010).   The keywords can be set through
the UI without limitation but are limited to 100 characters when using powershell!  It makes no sense!
I suppose my final update could be done by hand (ugh!) and I would much rather be able to script these updates.  
Any pointers or help?

Hi grobinson,
If you used this code line in your Powershell and have the following error:
[string[]]$QueryRuleTerms=@($QueryRuleConditionTerm)
Exception calling "CreateKeywordCondition" with "2" argument(s): "The value must be at most 100 characters long.
Parameter name: Term"
At line:2 char:1
+ $QueryRuleCondition = $QueryRuleConditions.CreateKeywordCondition($QueryRuleTerm ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentOutOfRangeException
You need to use the following code line with Split() method to add the multiple terms, it will work.
$QueryRuleConditionTerm = "a1;a10;a100;a101;a102;a103;a104;a105;a106;a11;a12;a13;a14;a15;a16;a17;a18;a19;a2;a20;a21;a22;a23;a24;a25;a26;a27;a28;a29;a3;a30;a31;a32;a33;a34;a35;a36;a37;a38;a39;a4;a40;a41;a42;a43;a44;a45;a46;a47;a48;a49;a5;a50;a51;a52;a53;a54;a55;a56;a57;a58;a59;a6;a60;a61;a62;a63;a64;a65;a66;a67;a68;a69;a7;a70;a71;a72;a73;a74;a75;a76;a77;a78;a79;a8;a80;a81;a82;a83;a84;a85;a86;a87;a88;a89;a9;a90;a91;a92;a93;a94;a95;a96;a97;a98;a99;a991"
#use the following codeline, it worked for me
[string[]] $QueryRuleTerms = $QueryRuleConditionTerm.Split(";")
$QueryRuleConditions = $QueryRule.QueryConditions
$QueryRuleCondition = $QueryRuleConditions.CreateKeywordCondition($QueryRuleTerms,$true)
$QuerySourceContextCondition = $QueryRule.CreateSourceContextCondition($ResultSource)
$QueryRule.Update()
Thanks,
Daniel Yang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Daniel Yang
TechNet Community Support

Similar Messages

  • Configure DNS Setting via Powershell

    Hi,
    I am trying to get a script together that will configure a static IP address, DNS, and WINS server settings. The instructions here are great, except the DNS part doesn't work.
    http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/28/use-powershell-to-configure-static-ip-and-dns-settings.aspx
    Here are the commands in the script:
    $wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = 'true'"
    $wmi.EnableStatic("192.168.1.2", "255.255.255.0")
    $wmi.SetGateways("192.168.1.1", 1)
    $wmi.SetDNSServerSearchOrder("208.67.220.220", "208.67.222.222", "8.8.8.8")
    $wmi.SetWINSServer("192,168,1,1")
    Each time I run the script it fails on the DNS portion. I am doing this on Windows Server 2012. The specific error message is: Cannot find an overload for "SetDNSServerSearchOrder" and the argument count: "3".
    Any ideas? Thanks
    Jason Watkins MCSE, MCSA, MCDBA, CCNA

    Hi N74JW,
    What is your current situation?
    If issue insists, you may take a try to save the DNS Server into a variable, see:
    $dnsSearchOrder = "208.67.220.220", "208.67.222.222", "8.8.8.8"
    $wmi.SetDNSServerSearchOrder($dnsSearchOrder )
    Then check if issue could be solved.
    Best regards
    Michael Shao
    TechNet Community Support

  • REST API and best bets / query rules

    Is there a bug in this?  I can not get best bet results regardless of the query string.  For example, the following (according to MSDN documentation) should process the query rules and return a best bet.  But it doesnt.  Am I doing something
    wrong in the query?  It only seems to return ordinary results.  Performing the same search via Sharepoint's UI returns the best bet at the top.
    $.ajax({
    url: "http://myserver/sites/mysite/_api/search/query/?processbestbets=true&enablequeryrules=true&querytext='" + searchText + "'",
    type: 'GET',
    headers: {
    "accept": "application/json; odata=verbose"
    success: myCallback,
    error: function(data) {
    alert(data.responseXML.text);

    Hi Scott,
    With EnableQueryRules and ProcessBestBets set to true in the search rest api, we can get the promoted results(best bets) in SharePoint 2013.
    I recommend to type the search rest api URL in the browser directly and then check if the best bets are displayed at the top of the search results.
    It will not displayed inside the table for normal results.
    Please also make sure that the query text matches the query rule condition.
    Thanks,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Query rule using query variables

    Hi All,
    I am working on a query rule in SharePoint 2013. I am trying to build a query text using query variables to provide profile based results to the users. The query text which I am using in the query builder is of the following format:
    {SearchBoxQuery} CombinedLanguage:{User.PreferredContentLanguage}
    but its not taking the user.preferredcontentlanguage value. Has any one worked on similar type of query rules using query variables? Please share your suggestions.
    Thanks !!

    Hi,
    As I understand, you cannot get the user.preferredcontentlanguage value.
    1. Make sure you have set the value of query variable {user.preferredcontentlanguage}, it will return -1 if not set.
    2. Make sure you search in the right result source.
    3. Please check the crawled property mapped to the managed property CombinedLanguage and make sure that there is at least one value indexed by the crawled property equal to the {user.preferredcontentlanguage}.
    The article below is about the query variables.
    https://technet.microsoft.com/en-us/library/jj683123.aspx
    The article below is about the different query variables return different result examples.
    http://techmikael.blogspot.in/2014/05/s15e03-query-variables-constant-trouble.html
    Best regards
    Sara Fan
    TechNet Community Support

  • DRG-11112: length of CLOB query value exceeds maximum of 64000

    Is there a CLOB length limitation when running an Oracle Text search? (v 11.1.0.7) I have checked the Reference Guide and Application Developer's Guide.
    --create table
    create table nk_1929(id number, vc_a clob);
    --insert dummy data
    declare
    vc_clob clob;
    begin
    vc_clob := lpad(to_clob('a'), 222920, 'a');
    insert into nk_1929 values(1, vc_clob);
    end;
    --create index
    create index nk_1929_ndx on nk_1929(vc_a)
    indextype is ctxsys.context parameters('
    datastore ctxsys.default_datastore
    stoplist ctxsys.empty_stoplist');
    --run query with a search string longer than 64000
    declare
    str1 clob;
    query_term clob;
    begin
    select vc_a into query_term from nk_1929 where id = 1;
    str1 := 'select id from nk_1929 where contains(vc_a, :1) > 0';
    execute immediate str1 using query_term;
    end;
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-20000: Oracle Text error:
    DRG-11112: length of CLOB Query Value exceeds maximum of 64000
    Please let me know if I am missing something here?

    Same 64000 CLOB query value limitation is also generated with a simple select:
    --run query with a search string longer than 64000
    declare
    vn_id number;
    query_term clob;
    begin
    select vc_a into query_term from nk_1929 where id = 1;
    select max(id) into vn_id from nk_1929 where contains(vc_a, query_term) > 0;
    end;
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-20000: Oracle Text error:
    DRG-11112: length of CLOB Query Value exceeds maximum of 64000

  • Query of length 4042 hangs

    All,
    Has anyone had a problem where a query of exactly 4042 bytes hangs when run from the thin driver? I'm pretty sure this is the exact problem, since one other fellow reported it. His only solution was to not use the thin driver, but that's not a good option for us. Here's what I know:
    * Query is 4042 bytes long
    * Query runs fine from TOAD, but from JDBC (Statement.execute(String)) it never returns.
    * Query runs fine from JDBC if I alter the length in any way, e.g. add or subtract a space, etc.
    * Seems to work fine against our dev database on NT but not the test database on AIX.
    * Oracle version is 8.1.7.
    * Used several of versions of the driver, including the latest.
    Any ideas?

    Sure. I have left this formatted exactly as it is when I inspect the String variable which holds the SQL at run time. Pasting the string to this HTML TEXTAREA element seems to trim some spaces and/or tabs, so the length isn't going to be the same, but trust me, it's normally 4042.
    select StudBase.CUSTOMER_ID, StudBase.CUSTOMER_NUMBER, StudBase.CUSTOMER_NAME, StudBase.CCX_ID, StudBase.student_key, StudBase.student_edit_id, StudBase.student_move_id, StudBase.student_merge_id, StudBase.student_delete_id, StudBase.student_last_name, StudBase.student_first_name, StudBase.student_middle_name, StudBase.student_gender, StudBase.student_date_of_birth, StudBase.student_date_of_birth_text, StudBase.student_id student_id, StudBase.student_grade, StudBase.STUDENT_EXTERNAL_STUDENT_ID, StudBase.student_update_date, StudBase.student_updated_by, StudData.student_property, StudData.student_property_value from (select CUST.ID CUSTOMER_ID, CUST.CUSTOMER_NUMBER CUSTOMER_NUMBER, CUST.NAME CUSTOMER_NAME, CCX.ID CCX_ID, stud.id student_id, Stud.student_key, stud.edit_sc_id student_edit_id, stud.move_sc_id student_move_id, stud.merge_sc_id student_merge_id, stud.delete_sc_id student_delete_id, Stud.last_name student_last_name, Stud.FIRST_NAME student_first_name, Stud.MIDDLE_NAME student_middle_name, Stud.gender student_gender, Stud.DOB student_date_of_birth, Stud.dob_text student_date_of_birth_text, Stud.GRADE student_Grade, Stud.EXTERNAL_STUDENT_ID student_EXTERNAL_STUDENT_ID, Stud.update_date student_update_date, Stud.updated_by student_updated_by from T_STUDENTS Stud, T_CUST_CYCLE_X CCX, T_CUSTOMERS CUST where Stud.id in (1074657,1074525,1074573,1074635,1074641,1074616) and STUD.CCX_ID = CCX.ID and CCX.CUST_ID = CUST.ID) StudBase, (select sd.stud_id student_id, ad.NAME student_property, sd.VALUE student_property_value from T_STUDENT_DATA sd, T_PRESENTATION_ATTRIBUTES PA, T_PAGE_LAYOUTS PL, T_ATTRIBUTE_DEFINITIONS AD where sd.STUD_ID in (1074657,1074525,1074573,1074635,1074641,1074616) and sd.AD_ID = ad.id and ad.id = pa.AD_ID and pl.cycle_id = 9417 and pl.id = pa.LAYOUT_ID and pl.name = 'RECCHG_STUD_DETAIL_BODY')StudData where StudBase.student_id = studData.student_id (+) ORDER BY STUDENT_ID

  • Reporting or Query Rule to get the machines with particular software Update.

    Hello Guys,
    My Device collection has 10 machines, Need to get information whether these machines have
    Service Pack 2 for Microsoft Office 2010 (KB2687455) 32-Bit Edition
    installed,
    Please help me with the query rule or correct reporting to get the information. Since the Updates are
    not listed under Add or Remove programs am not able to use other reporting which i use normally.
    Please assist.

    Are you sure that you don't see the SP in add/remove programs if you click "View installed updates"?
    You should...
    You can use hardware inventory to pick up the info, but you need to enable the Hardware Inventory Class "quick fix engineering (Win32_QuickFixEngineering)" in the client settings.
    Then you can use a query, e.g.
    SELECT
    HotFixID0
    ,Description0
    ,InstalledOn0
    FROM
    v_GS_QUICK_FIX_ENGINEERING

  • Syntax of a query rule to exclude results from site collection

    Hi,
    I'm trying to edit a query rule to exclude results from a site collection.
    I'm coping the "Local SharePoint Results" and want to add something like -path=http://server/sites/demo/*
    but somehow it doesn't work. can someone help with the exact syntax (should to write http, "", to write with {} etc.)
    keren tsur

    -SiteId:<guid>
    should work. Or:
    -path:http://server/sites/sitecollection
    Thanks,
    Mikael Svenson
    Search Enthusiast - SharePoint MVP/MCT/MCPD - If you find an answer useful, please up-vote it.
    http://techmikael.blogspot.com/
    Author of Working with FAST Search Server 2010 for SharePoint

  • Character Length of a Query

    What is the maximum length or a query in Oracle? I have to build a query with a variable length where clause and cannot find any doc on how many characters my select statement may contain.

    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96536/ch44.htm#288033
    All I did was use the search engine at handy-dandy "HOW TO: Find online documentation for Oracle" link that Andrew just posted about 6 hours ago.
    See: Re: Calling a service method from a DataAction
    Michael

  • Sql statement substituion - any special rules for formatting the query?

    Hey,
    I was wondering - are there any special rules for formatting the query that is to be substituted?
    I am asking, as somehow I am unable to make the DSP substitute my query. I took the basesql from the server console (to make sure that I have the correct version), configured a query substitution, and well, nothing happens.
    I've tried to substitute it with a modified version of the original query (where NVL(,0) is changed to NVL(,-9999)), then also with select * from dual (which I hope would generate some error), but DSP is ignoring everything...
    The query is rather big (400 lines), so maybe I need to format it somehow? I've noticed that in the docs (http://edocs.bea.com/aldsp/docs25/admin/server.html#wp1049919) that the query used in the example has all leading spaces removed. I've tried that, but DSP is still not doing any substitution...
    Any suggestions welcomed...
    Thanks,
    Leszek

    Michael,
    I am doing everything as in edocs, retrieving from logs the basesql (so with place holders). I've removed all new lines (so the query is now in a single line) and all excessive blanks (so all double/more blanks replaced with a single blank). Still the DSP is like ignoring the substitution. I've tried to do it even with a simple query, like:
    SELECT t4."PRODUCT_ID" AS c1, t4."PRODUCT_NAME" AS c2 FROM {DB}.{SELECTION} t1 JOIN {DB}.{CUSTOMER_FACT} t2 ON (t1."VAL" = t2."CUSTOMER_ID") JOIN {DB}.{CUSTOMER} t3 ON (t3."CUSTOMER_ID" = t2."CUSTOMER_ID") JOIN {DB}.{PRODUCT} t4 ON (t4."PRODUCT_ID" = t3."PRODUCT_ID") WHERE ((? = t1."SESSN_ID") AND (t1."NAME" = 'CUSTOMER_ID') AND (t3."DELET_DATE" IS NULL) AND (t3."PRODUCT_TYPE" = 11))
    am I missing something here? do I need to remove/add something , to make it work?
    I've tried removing blanks around = signs (which from the DSP pov results in a different query), sitll with no results.
    Edited by xnts at 06/24/2008 7:37 AM

  • ATG Search | Query Rules are not executing

    Hi,
    We want to put some search relaxation, for example partial entry of a search term returns results i.e.if user enter "shi" results should show all shirts.
    Followed following steps for that,
    1) Created query rules for wildcard pattern with a actions.(For example created a pattern "shi*" and action "prop,string,displayName,Shirt" , so that when a user enter "shi", search results would return all products whose name contain "Shirt" or "Shirts".
    2) After indexing, verified Query Rules are applied; using "Index Review" (QueryRuleLoad -- 4 rules, 4 patterns, 4 actions, from stream)
    3) Layered the component /atg/commerce/search/catalog/QueryRequest property ruleMode to exec so that search request contain "ruleMode=exec" as per ATG docs.
    4) Clear and Disable cache using the component : /atg/search/routing/CacheService/
    5) Search submitted on site for "shi".
    6) Verified Search request XML that "ruleMode=exec" is being send to Search Engine.
    But as per query rules, search results/response are not coming, verified response XML, but didn't find any clue.
    Are we missing any configuration for query rules to execute or the pattern & action which we have created are not proper ?
    Thanks,
    Sarbajeet

    Hi  ,
    According to your description, my understanding is that you want to configure Query Rule for the SharePoint Contextual Search (by default its result page is osssearchresult.aspx).
    As far as I know, the Query Rules
     work in the SharePoint Contextual Search when you define them on site level. You can create your query rule in
     your Site ->  Site Settings -> Search -> Query Rules.
    Meanwhile the SharePoint Contextual Search is based on the result sources defined in the Site Settings->Search -> Result Sources, you need to make
     the result source of your Query Rule to the above Result Source.
    Reference:
    http://sharepoint.stackexchange.com/questions/64393/where-to-define-query-rule-and-when
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Unable to access Query Rules and Result Sources in SSA

    I have access to our Search Service Application (SSA) within Central Administration.  I am able to get to all of the options within Search Administration except for Query Rules and Result Sources.  Does this require farm admin access or is there
    something special that needs to be done for access to these two areas?  I can get to all of the Diagnostics, Crawling, and the other Queries and Results options without issue.  Our farm admin has been looking at it, but we have not been able to determine
    why my access is not allowing me to get to those options.  Any info you may have about this will be much appreciated.
    Thanks!
    Brian

    Hi scalawagd,
    This issue seems to be about permissions. Please add the user into the search service administrator group and give him full control, compare the result. You can try to give the user permission like the screenshot:
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Combining query rules and wildcards

    Hi,
    is there a way to use wildcards and query rules in one query? For example i have a keyword "customer" which allowes me to search in a specific list. Now i would like search with additional wildcards because i maybe don't know the whole name of
    the customer e.g. "customer micro*". The problem is now, that when a i use the wildcard in this combination, i do not get any results.
    Many thanks! 
    Michael

    maybe i used the word keyword in a wrong context. I didnt mean the keywordquery, only the keyword"Query Contains Action Term"
    you can define in the query rules configuration. 

  • Web Service URL length limits, LV2013 vs LV2012

    (* CROSS POST: http://lavag.org/topic/18435-web-service-url-length-limits-lv2013-vs-lv2012/ *)
    (* Please reply in this forum.  I have marked the other thread to put replies here. *)
    Has anyone noticed a reduction to the limit on URL length for Web Services between LV versions 2012 and 2013?
    Under LV2012, a RESTful web service appears to accept URL with lengths at least as long as 4096 characters.  With LV2013, the max URL length appears to be 511 characters for both RESTful and Project Item web services. Unfortunately for me the project I just converted trips over this issue. My goal with posting this query to here is to improve my understanding of this limitation before I decide how best to modify my code.  Certainly using POST rather than GET with a long URL is an option, but again, I'm looking to understand the change in limitation before I choose a solution.
    To illustrate I have attached three mostly identical projects which demonstrate the issue.  In each case the project contains a webservice consisting of a single VI, "ComputeLength", which takes a String as an input parameter and which outputs the length of the string.  The three projects are as follows.
    1. LV2012 RESTful web service.
    2. LV2013 RESTful web service.
    3. LV2013 Project item web service.
    The web service contains a single VI.  For the RESTful examples, the web service is started by selecting Deploy from the Build specification right click menu.  For the Project Item example, the web service is started by selecting Start from the MyComputer/WebService right click menu. The use of this example is demonstrated with the following URL: 
    (note that the port is 8080 for the two RESTful examples and is 8001 for the Project item web service if used in Debug mode, which is the default for the above instruction.)
    http://localhost:8080/webservice/computelength?string=1234567890
    And the output looks like this.
    <Response>
    <Terminal>
    <Name>StringLength</Name>
    <Value>10</Value>
    </Terminal>
    </Response>
    To see the issue, extend the string parameter such that the URL contains more than 511 characters beyond the port number.  For example something like this, http://localhost:8080/webservice/computelength?string=1234567890123456789012345678901234567890....(keep repeating)
    For the LV2012 example the string parameter may be at least as long as 4000 characters, which I've demonstrated using Chrome as my browser.  For both of the LV2013 examples the URL is limited to 511 characters after the localhost and the port number.
    Anyone know whether this is a bug or this is an intentional design change?  How about whether the URL length limit is configurable? 
    I am also consulting NI tech support and will report back their response.
    Any advice appreciated.
    Thanks,
      Martin
    Solved!
    Go to Solution.
    Attachments:
    mywebservice.LV2012.RESTful.zip ‏12 KB
    mywebservice.LV2013.RESTful.zip ‏12 KB
    mywebservice.LV2013.ProjectItem.zip ‏11 KB

    Solution found.  Apparently starting in LV 2013, there is a default limit of 512 to the URL length.  The default limit may be overridden as described below.
    Martin
    This is Brian in Applications Engineering from National Instruments. I am following up regarding the 511 character limit in your Web Service HTTP request following the port number. After some research I've figured out that the issue is related to a default web server setting called "LimitUri," which limits the maximum length of a URL. The default setting is 512 characters which is why we are seeing this issue.
    There are multiple ways of changing the URL length limit depending on how you are using your web service. If you are publishing the web service using the Application Web Server then modify "C:\Program Files (x86)\National Instruments\Shared\NI WebServer\NIWebAppServer.conf" and add "LimitUri 4096" to the end of the file without the quotes.
    If you are running the Debug Web Server by just clicking start on the web service then modify "C:\Program Files (x86)\National Instruments\LabVIEW 2013\resource\webserver\niwsdebugserver.conf" and add "LimitUri 4096" to the end of the file without the quotes.

  • Difference between sap query and sap ad hoc query

    Hello Experts-
    Is there any difference between sap query and sap ad hoc query. If yes, I will appreciate if you can provide some input.
    Thanks,

    Hi,
    SAP Query
    Purpose
    The SAP Query application is used to create reports not already contained in the default. It has been designed for users with little or no knowledge of the SAP programming language ABAP.
    SAP Query offers users a broad range of ways to define reports and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    The SAP Query comprises five components: Queries, InfoSet Query, InfoSets, User Groups and Translation/Query.
    Classic reporting- the creation of lists, statistics and ranked lists- are covered by the InfoSet Query and Queries components. Other components’ range of functions cover the maintenance of InfoSets, the administration of user groups and also the translation of texts created in the SAP Query.
    All data required by a user for a report can be read from various tables.
    To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. In the WYSIWYG mode, you can edit the lists using Drag & Drop and various toolbars.
    AD Hoc Query
    Definition
    A Web item that enables you to create and change queries in a Web application on an ad-hoc basis.
    Use
    You can use the  Ad-hoc Query Designer Web item in the Web Application Designer to structure Web applications in which you create or change queries. The Web item is as a tool for designing ad-hoc queries in a Web environment.
    In particular it enables you to:
    ·        Create queries by assigning characteristics from an InfoProvider to rows, columns, filters, and free characteristics, and including key figures from the InfoProvider in the key figure structure of the query.
    ·        Restrict or filter key figures and characteristics
    ·        Use predefined key figure structures and restricted or calculated key figures in the query
    ·        Set or change query properties and key figure/characteristic properties in the query
    ·        Create or change conditions and exceptions
    When compared with the BEx Query Designer, the Ad-hoc Query Designer Web item has the following restrictions when creating or changing queries:
    ·        You cannot integrate variables into the query directly.
    However, you can use variables in reusable structures, or restricted or calculate key figures, which are used in the Ad-hoc Query Designer
    ·        The query can contain only one structure. This structure has to be the key figure structure and be in the rows or columns of the query.
    -        You cannot use key figures or key figure structures in the filter.
    -        You cannot define exception cells, since this requires two structures.
    You cannot create the following objects using the Ad-hoc Query Designer Web item:
    -         Reusable structures
    -         Reusable restricted key figures
    -         Reusable calculated key figures
    -        Local calculated key figures
    You can create local, restricted key figures using the Ad-hoc Query Designer Web item.
    You can edit existing queries in the Ad-hoc Query Designer Web item, if the queries adhere to the restrictions laid out above The Ad-hoc Query Designer checks these requirements when loading a query. If the query is too complex, the query can be loaded into the Ad-hoc Query Designer but you cannot change it there. You then receive the appropriate message. You can still check and execute the query.
    "Ad Hoc" is a Latin phrase which means "for this purpose" and in today's parlance generally means "on the fly," or "spontaneously."
    An ad hoc query is a query that is run at the spur of the moment, and generally is never saved to run again. These queries are run using a SQL statement created by a tool or an administrator. So therefore, such a query is one that might suit a situation which is only there for the moment and later on will become irrelevant.
    As queries become more complex, it can be difficult to write them correctly ad-hoc. To help with this, one can instead write the knowledge needed for queries as business rules in English, and then use a system called "Internet Business Logic" to automatically generate and run the SQL queries. One can then get explanations of the results, in English, at the business level.
    Check these links....
    http://help.sap.com/saphelp_nw04/helpdata/en/1f/03223c5f00612be10000000a11402f/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/80bf2f79-021d-2a10-5082-dadc79aaa92c
    http://www50.sap.com/businessmaps/27FEEF3A12444F89A8524CCACAF4F5BF.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/15/00a042b443c56ae10000000a155106/content.htm
    Reward points if useful....
    Regards
    AK

Maybe you are looking for