Query of queries (QofQ) escaped character problem

Hi all

I am trying to run a query or queires (QofQ) and I do a LIKE comparison which finds support ([]) characters in the string, but ColdFusion ignores the media. How can I escape the character of support? So far, I couldn't escape the percentage based on the Docs sign live ColdFusion. The error message I get when I run the query below is:

«"" "Invalid escape sequence.»»»" Pairs of valid sequence for this escape character are: "------%", or "\".

This is the query:
< cfquery dbtype = "query" name = "getLogs" >
SELECT *.
OF GetLogs
WHERE Description LIKE '\[User:#UserID#\]% %' ESCAPE ' \'
< / cfquery >

Thanks for your help!

What of it?

WHERE my Description LIKE ' % [[] user: #UserID #] %'

Tags: ColdFusion

Similar Questions

  • escape character must be the string of length 1 (error ORA-01425)

    Hi all!

    I get this error message (SQL error: ORA-01425: escape character must be the string of length 1) when querying an oracle 9i database with:

    SELECT * FROM table WHERE column LIKE '%' ESCAPE ' \';

    Bar which makes it a double backslash (included with apostrophes) would solve the problem, however, with this change, the request is more executable in a 10g database.

    Is there a way to make the executable SQL above (with a single backslash escape) code in both (and latest) versions, without changing it? Maybe a server definition database that could solve this problem...

    Suggestions for the problem described are greatly appreciated!

    Thank you

    col2 NVARCHAR2 (100)

    OK, you should have mentioned before using unicode ;)

    However, should not always identical fields be treated identically in any database?...

    Yes, they should :(

    In any case the escape string should obviously be treated as unicode so the right way, I guess, would be

      select * from mytable where col2 like N'%' escape N'\'; 
    

    Note the front N ' \' to make the unicode string.

  • UTL_HTTP parameter with escape character

    Hi guys

    We implement our database to send SMS via a footbridge and to have a little problem with parsing the message to the htl_http package. We use the script below to send SMS

    DECLARE
        HTTP_REQ      UTL_HTTP.REQ;
        HTTP_RESP     UTL_HTTP.RESP;
        URL_TEXT      VARCHAR2(32767);
        URL VARCHAR2(2000);
        
        SMS_MSG VARCHAR2(160) :='This is a test message sent from Oracle Database';
        
    BEGIN
        DBMS_OUTPUT.ENABLE(1000000);
        
        URL := 'http://mysmsgateway/alerts/api/web2sms.php?username=test&password=test&to=9999555555&sender=ORASMS&message='||SMS_MSG;
             
        UTL_HTTP.SET_HEADER(HTTP_REQ, 'User-Agent', 'Mozilla/4.0');
        HTTP_RESP := UTL_HTTP.GET_RESPONSE(HTTP_REQ);
    
        -- Process Request
        LOOP
            BEGIN
                URL_TEXT := null;
                UTL_HTTP.READ_LINE(HTTP_RESP, URL_TEXT, TRUE);
                DBMS_OUTPUT.PUT_LINE(URL_TEXT);
    
                EXCEPTION
                    WHEN OTHERS THEN EXIT;
            END;
        END LOOP;
    
        UTL_HTTP.END_RESPONSE(HTTP_RESP);
    END;
    

    Now our problem is, while the SMS is received, we get just 'this' which is the first word of the variable SMS_MSG. It is because of the management of escape character, we believe. How to "escape" this problem?

    Any suggestions?

    Kind regards

    REDA

    Something like this:

    URL: = 'http://mysmsgateway/alerts/api/web2sms.php?username=test&password=test&to=9999555555&sender=ORASMS&message=' |
           UTL_URL. Escape (SMS_MSG, TRUE);

  • Zoom on query of queries

    I use stand-alone ColdFusion 9

    I'm still a little new to this, but I found code of exploration down that fits my needs for my application. It uses a query of queries which, to a certain extent, I understand. My problem is when I want to take down a few steps further. The first query lists products that are associated with related by-products. By clicking on a product, it will display a list of related subcategories. I would then each by-product a link to a detail page, but I don't know if my link of by-product code is correct, and I'm not sure what the page detail request should look like to show this specific detail of by-product. Here is the code I have so far:

    The exploration down product page:

    < cfquery name = "GetDetail" datasource = cachedwithin "mm_instance" = "1" >
    SELECT products.productID, products.product, instance.instances
    OF products, Instance, ProductInstance
    WHERE products. ProductID = ProductInstance.productID AND ProductInstance.instanceID = instance.instanceID
    < / cfquery >
    < cfquery dbtype = "query" name = "zoom on" >
    SELECT DISTINCT productID, product
    OF GetDetail
    ORDER BY product
    < / cfquery >

    < cfoutput query = "Zoom on" >
    < table width = "100%" id = "box" >
    < b >
    < td valign = "top" width = "510" id = "prodname" > < a href = "Inst_List.cfm? ProductID = #DrillDown.ProductID # "> #DrillDown.product # < br > < /a > < table >"
    < /tr >
    < /table >
    < / cfoutput >

    By-product (or Instance) exploration to the bottom of the Page:

    < cfquery name = "GetDetail" datasource = cachedwithin "mm_instance" = "1" >
    SELECT products.productID, products.product, instance.instances
    OF products, Instance, ProductInstance
    WHERE products. ProductID = ProductInstance.productID AND ProductInstance.instanceID = instance.instanceID
    < / cfquery >
    < cfquery dbtype = "query" name = "zoom on" >
    SELECT instances, productID
    OF GetDetail
    WHERE GetDetail.productID = #url.productID #.
    ORDER BY product
    < / cfquery >

    < cfoutput query = "Zoom on" >
    < table width = "100%" id = "box" >
    < b >
    < td valign = "top" width = "510" id = "prodname" > < a href = "Inst_Detail.cfm? productID = #DrillDown.productID #" > #DrillDown.instances # < /a > < table >
    < /tr >
    < /table >
    < / cfoutput >

    By-product of detail page:

    Don't know what this query should look like

    Thank you!

    You are using too many requests.  On the first page, just select a different set of products and their identification card, unless you need the value of the instance for something else.  On your exploration down the page, you must select all products again.  Simply select one of the variable url.

  • query of queries case-sensitive

    Hello

    I have a question regarding this issue.  I am pulling data from an xml file and dump these data in the query of queries and their output.  The problem is when I try to order the CSA query, the stem will be high and fewer will be on the bottom.  Is it possible to sort them before the dump in query data?  Or ways around this?

    Thank you.

    functions upper() and lower() SQL function in q.

  • Can't find answer to a query of queries error

    Not only I saw this forum, but also google this problem, but the unfortunnately I have no chance to find the answer.

    I wrote this simple query:

    < cfquery name="test" dbtype="query">

    Select The SSN, date of birth de myquery where SSN <> '' OR Date of birth <>"

    < / cfquery >

    and I got this error:

    Error running query of queries.

    Exception of comparison when running <>.
    Unsupported Type comparison Exception: the <>operator does not support comparison between the following types:
    Type of expression left side = 'DOUBLE '.
    Expression type side right hand = "STRING".

    I tried the following and has not worked either, still got the same error.

    < cfquery name ="test" dbtype ="query">

    Select The SSN, date of birth de myquery

    NSS <> < cfqueryparam cfsqltype ="CF_SQL_VARCHAR" Value =""/ >

    OR Date of birth <> < cfqueryparam cfsqltype ="CF_SQL_VARCHAR" Value =""/ > < / cfquery >

    Ever met someone the same problem and know how to solve it?

    Select SSN, date of birth of myquery where cast (SSN to the varchar type) <> " OR cast (date of birth as varchar) <> "

  • Deactivation of the PowerShell escape character

    I need to use Get-VMGuestNetworkInterface on about 100 mV.  They are members of domain created from the same template with the same local administrator account.  Unfortunately, the local administrator password using the 'character.  The "character is the PowerShell escape character.  The escape character will not allow itself be included with a string value, so when I try to pass the parameter - GuestPassword, it does not include the "character, the password is incorrect, and the authentication will fail.  Anyone know who to use the "character in a string literal?

    Depends on hwo you pass the string between apostrophes, the backtick didn't need to be escaped (' pass'word ').

    Quotation marks, use the back-slash ("past" word")

  • Before escape character point in the dn entry after provisioning OID

    Our users IOM are automatically provisioned to OID using OID box connector. Everything works well except this issue.

    When the value of "User login" IOM contains the character (called BILLY. (BOB), the dn entry in OID is created with an escape character (dn: uid = BILLY\.) BOB, cn is users, dc = abc, dc = com).

    Example:
    'User Login' IOM = BILLY. BOB
    :
    :
    OID entry created as
    DN: uid is BILLY\. BOB, cn is users, dc = abc, dc = com
    First name: Billy
    UID: BILLY. BOB
    CN: Billy Bob
    :
    :

    Note that the uid does not get the escape character, only the dn value is getting affected.

    Thanks in advance!
    Kabi

    You must remove. in the definition of research, which comes with STANDARD connector.

    Re: OID Connector.User Id includes "------" seen by DOHAD

  • How to use the escape character in the update statement.

    Hi all

    I'm trying to update using the following table update statement in sql, but whenever he asks me to enter the value 'and' below sql.
    UPDATE xyz_xyz
       SET NAME = 'ABC & PQR'
     WHERE ID = (SELECT ID
                   FROM abc_abc
                  WHERE NAME = 'C & PQR');
    Please let me know how to use escape character syntax or let me know if there is no alternative.

    Thank you
    Vishwas

    If you use SQL * more then use SET DEFINE OFF.

    Also, you can do something like this

    UPDATE xyz_xyz
       SET NAME = 'ABC' ||'&' || 'PQR'
     WHERE ID = (SELECT ID
                   FROM abc_abc
                  WHERE NAME = 'C' ||'&' ||'PQR');
    
  • Query of queries: error when you try to fake Left Outer Join

    Hello

    I'm trying to reproduce a left outer join, combining two query of queries using a method I find here

    However, I get an error message...

    Here is the code I use...

    < cfquery dbtype = "query" name = "qry" >
    SELECT *.
    OF returnQry, returnQry2
    WHERE returnQry.mediumImage = returnQry2.mediumImage
    ORDER BY returnQry.name
    < / cfquery >

    < name cfquery = "returnQry3", dbtype = "#application.mx #" >
    SELECT *.
    OF trackmeanings t
    < / cfquery >

    < cfquery dbtype = "query" name = "endQry" >
    SELECT name, nameRcd, mediumImage, comments COUNT (sMessage)
    OF qry, returnQry3
    WHERE qry.name = returnQry3.sNameTrack

    UNION

    SELECT name, nameRcd, mediumImage, comments COUNT (sMessage)
    OF qry, returnQry3
    WHERE #qry.name # NOT IN (#QuotedValueList (returnQry3.sNameTrack) #)
    GROUP BY name, nameRcd, mediumImage
    < / cfquery >

    When I try to use the query output in a page, I get the error message "incorrect conditional expression, waiting for an a [as |]» null | between | in | "comparison condition.

    Anyone have any ideas?

    Thank you very much

    The items in the list should be cited.  Since you are using quotedvaluelist, it's weird that they aren't.  However, if you use cfqueryparam, list = Yes, you should have better luck.  Among other things, it will protect you against the apostrophe in names.

  • Error running query of queries

    Hello

    I am in the process of updating my site in CF5 to CF9 and I get a "query of query error" on the following code each time I have add the first point to my shopping cart. If I add a second element, the error disappears. Here are two pieces of keys to the code where I pull the item from the database information and then use the query requests to merge the query with the amount of shopping cart.

    <!-get-> Product Details

    < CFQUERY NAME='GetDetails'

    DATASOURCE = ' #request.ds # '

    Username = ' #request.dsuser # '

    PASSWORD = ' #request.dspass # ' >

    SELECT
    ItemNo,

    Agenda,

    Grades,

    Price,

    ImageSmall

    DE Products
    ItemNo IN (#QuotedValueList(GetCart.ItemNo) #)
    < / CFQUERY >

    <!-add the column "OrderQty"->

    < CFQUERY NAME="GetList" DBTYPE="query">

    SELECT
    GetDetails.ItemNo YOU ItemNo,

    GetDetails.Item point, AS

    GetDetails.Grades AS Grades,

    AS price, GetDetails.Price

    GetDetails.ImageSmall AS ImageSmall,

    GetCart.Quantity AS OrderQty

    DE GetDetails, GetCart
    GetDetails.ItemNo = GetCart.ItemNo
    < / CFQUERY >

    This is the error I get. The line number refers to the Q of Q above.

    Error running query of queries.

    Comparison = runtime exception.
    Comparison of Type incompatible Exception: on the left side and right side of the comparison operator "=" have incompatible types.
    Type of expression left side = "VARCHAR".
    Expression type side right hand = "DATE".

    I tried a lot of things affect a 'string' type to the right, but nothing seems to work.

    I would be very happy any help that I can get as I've spent countless hours trying to figure this.

    Thank you
    Steve

    Looks like the GetCart query is generated with functions to query coldfusion as opposed to a database query.  It also seems that the QueryNew function has the names of the fields, but not the types of data.  This means some trys to ColdFusion for the type of basic data on the first rows of data.

    Or it could be something else.

  • Query question queries

    You can query a query created using queryNew()?

    When I try the following code, I get an error:

    "Query of queries syntax error.
    Meeting "qData. user. "Incorrect conditional expression, waiting for an a [as | null | between | in | comparison] condition."

    Code:

    < cfset qData = queryNew ("tool, user, community, fm01, fm02, fm03, fm04, fm05, fm06, fm07, fm08, fm09, fm10, fm11, fm12, fy") >
    < cfset temp = #queryAddRow (qData) # >
    < cfset temp = #querysetCell (qData, "tool", "empty") # >
    < cfset temp = #querysetCell (qData, "user", "Bob") # >

    < cfquery dbtype = "query" name = "chkQdata" >
    SELECT *.
    OF qData
    WHERE qData.user = 'Bob '.
    < / cfquery >

    I just tried the code you provided, adding two cfdump Tags (the first to empty the qData query and the second to empty the chkQdata query). Everything worked well exactly as you had it on Railo 3.1. It did not work (threw the error you got) on CF 8.0.1.

    If I deleted the WHERE clause of the query of chkQdata, it runs (no error) in CF 8.0.1.

    For that it works as you want in CF8, change the user column. This seems to be a keyword for CF8. While I didn't check exactly, if I change your original request to be 'empty' = tool, it runs. In addition, rename the column user usr generates the script runs correctly.

    Here is the code that I had to work in CF8 and Railo 3.1:

    SELECT *.

    OF qData

    WHERE the usr = "Bob."

  • Query of queries

    I am having trouble with the query of queries in CF5. I have included my select statement in the attached code.

    I want to be able to do now is to select totals of the original with a query of queries request. For example, I need to know my total return compared to my new visitors total visitors (for the love of the query, a new visitor is a person whose FirstVisitDate statement date range the user specified [attributes.start to attributes.end] and a return visitor is someone whose FirstVisitDate does nto fall within the specified range.)

    I tried something like:
    < cfquery dbtype = "query" name = "GetNewHits" >
    Select Count (Visitor)
    Of QueryVisitors
    Where FirstVisit
    Between #attributes.start #.
    and #attributes.end #.
    < / cfquery >

    The above query (when he returned to all results) returns all records in the original request (for me, it seems that the FirstVisit field doesn't recognize as a date field). Can anyone offer any suggestions? Thank you

    -Daniel Casper

    I wish I had the choice to upgrade, but the company is not apparent from a local server and our Web host is 2 releases from behind. I think I found a way to implement without however using Q of Q.

    I put an increment conditional when the results are displayed, which checks the date against my range of user and then increments a variable newhit if it corresponds to the range, or increments a variable returnhit if it is not. Until now it works fine. If someone needs it, the increment of conditional is:



    Thank you all for your suggestions.

  • Query of queries on 2 data sources

    I'm doing a query of queries on 2 different data sources. I run a gaming site and have a 2 programs that are used for tracking. One is written in php, by someone else, following members point State. The other, I wrote it in CF, allows members to set priorities in Treasury. Both are independent on my server. What I'm trying to do is set up so that the program I wrote to FC shows the number of points, each Member has. I know how interrogate separate tables, but how do I combine them? In addition, how can I set up so that it only shows members that match. that is, I want to assure you that if John Smith has 100 points, the query will show John Smith 100 points on my table. Here is what the query looks like I did. As you can see, I'm confused about and WHERE statements. I played with him last night and could not make it work. Thank you.

    You can try the same correction/idea of what I posted in thread http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=1&catid=7

    Copied/Pasted from this thread:

    You can read through the first query and add content to a query to temp attributing some kind of field and then read through the second query and add same temp with a kind of field to the query. Then do a query of this temp query.

  • Query of queries error

    I use the same data source to create a query of queries, but one of my questions is not recognized. The codes and messages are the following:

    You do not use the datasource with a query of query property
    tag. When you do a query of query you are dealing with record sets
    memory. Delete the "datasource" setting in the third tag.

Maybe you are looking for

  • How to remove viruses

    My computer has slowed down. Any time I type a command on safari... Mckeeper antivirus pops up with the warnings. Overall speed has also reduced

  • Difference between all mails &amp; Inbox?

    Hi, I'm mew to THunderbird and even Linux OS. I have configured my gmail account in Thunderbird, but most of the emails have been downloaded in all mails. Later, when the value of the filter for synchronization... the same messages have been copied t

  • How to open backcover HP 15-021ND

    I want to change my hard disk SSD, but I can't open the back cover of my HP 15-R021ND after unscrewing it. Who can help out me? Cordially Norvanlor

  • HP5780 All in One: memory

    How can I clear the mwmory in my unit, so I can dispose safely?

  • 2009 DLL problems

    I am trying to import a dll in 2009, I used tools, import, hsared library (.dll), then I do not get a choice on the next window "specify create or update mode" is selected. On the next window, I put the path to the dll and header. There are them an a