Single quote is now double single quotation mark

Hello
I'm building a feature to allow users to download their own accounts in a system of appeal. These lists could be a couple thousand items long. I use mysql as the backend db. Instead of insertions of 2000 I'm trying to concatenate the values together to make an insert in the form: INSERT INTO tbl_name (a, b, c) VALUES (1,2,3), (4,5,6), and (7,8,9)
my code in the loop is as follows:
< cfset vs = vs & "(" & #gid #& ',' #gid#&',') "
& Chr (39) & #Q.soldto # & Chr (39)
& "," & Chr (39) & #Q.shipto # & Chr (39)
& "," & Chr (39) & #Q.billto # & Chr (39)
& "," & Chr (39) & #Q.name # & Chr (39)
& "," & Chr (39) & #Q.address # & Chr (39)
& "," & Chr (39) & #Q.city # & Chr (39)
& "," & Chr (39) & #Q.state # & Chr (39)
& "," & Chr (39) & #Q.zip # & Chr (39)
& "," & Chr (39) & #Q.phone # & Chr (39)
& "," & Chr (39) & #Q.region # & Chr (39)
("&","& Chr (39) & #lid #& Chr (39) &"), ">"

and when I dump the var #vs # I get:
(100, '139929', ' 249393 ', ","cppaper",",",",",", ", '20061213081232'), ("128372', 100 249 483 ', ", 'bipapper',",",",",", ", '20061213081232')
which is the desired output
and my query statement is:
< cfquery datasource = "" #ds # "name ="qAddLead"debug ="true">"
INSERT INTO company
(subgroups_idsubgroups, soldto, shipto, billto, name, address, city, State, zip, phone, region, load id)
VALUES
(#vs #)
< / cfquery >

However when it runs I get an error of query syntax, and as you can see below, there is everywhere a real value double quote him!

INSERT INTO company (subgroups_idsubgroups, soldto, shipto, billto, name, address, city, State, zip, phone, region, load id) VALUES ((100,139929,'' 249393'','','' cppaper'','','','','','','','' 20061213081222''), (100,128372, "249483",","bipapper",",",", ",",","20061213081222"))

I want to wrap them around a cfqueryparam however I don't think that will work in this situation.
Any ideas?

Thanks in advance

I found the function PreserveSingleQuotes() and the resulting query is this and it worked:

INSERT INTO company
(subgroups_idsubgroups, soldto, shipto, billto, name, address, city, State, zip, phone, region, load id)
VALUES
#PreserveSingleQuotes (vs) #.

Tags: ColdFusion

Similar Questions

  • What is the difference between single quotation mark (') and double quote ("")?

    What is the difference between single quotation mark (') and double quote ("") in reports using SQL. When you use "xxx" and "xxx"? What is the difference of two of them?

    Thank you.

    http://download.Oracle.com/docs/CD/E11882_01/server.112/e10592/sql_elements008.htm#SQLRF51129
    http://download.Oracle.com/docs/CD/E11882_01/AppDev.112/e10472/fundamentals.htm#LNPLS199

    Edit

    What is the difference of two of them?

    In fact: it is better to simply forget double quotes ;)

    Published by: hoek on October 23, 2009 21:22

  • Include a single quotation mark

    Hi alll,.

    I have a question like this...
    WITH t AS (
    SELECT 'GreatkannAd' colnm FROM dual 
    UNION ALL
    SELECT 'Greatka' FROM dual 
    UNION ALL 
    SELECT 'GreatKaNNa' FROM dual 
    )
    SELECT 'SELECT * from yourtable_name' ||' '|| 'where columnname like' ||' '||'%'||colnm||'%'  from t 
    The output me do is
    SELECT * from yourtable_name where columnname like %GreatkannAd%
    SELECT * from yourtable_name where columnname like %Greatka%
    SELECT * from yourtable_name where columnname like %GreatKaNNa%
    But my requirement is to include a single quotation mark (') before the start and the end of each string.

    Power required is
    SELECT * from yourtable_name where columnname like '%GreatkannAd%'
    SELECT * from yourtable_name where columnname like '%Greatka%'
    SELECT * from yourtable_name where columnname like '%GreatKaNNa%'
    Kind regards
    Claudy

    Published by: Claudy K on January 10, 2011 04:38

    Try

    WITH t AS)
    SELECT 'GreatkannAd' double colnm
    UNION ALL
    SELECT "Greatka" FROM double
    UNION ALL
    SELECT "GreatKaNNa" FROM double
    )
    SELECT "SELECT * from yourtable_name ' |'" '|| ' where columnname like ' |' '||''' %'|| colnm | "%" ' t

    Alexander gelin
    http://nimishgarg.blogspot.com/

  • replace a single quote with the double quotes with the function replace

    I work with one apex page, which contains a text as a filter box. If I put a single quote and find then I get the error message saying that parse error.

    For this, I want to replace one single quotation mark with double quotes, so this should be perfect. and apex should show the result.

    A allow the query to the same which will replace the single quote with double quotes.

    Published by: Santhosh Kumar T 15 Sep 2008 05:13

    If it was confusing... Try the less confusion (according to you)! ...

    Select Replace ("ab" | ") "|' it," ',' "') twice;"

  • 'Save as csv' sets of quotation marks around the entire line

    Our customer relationships:

    Portal of data-> right click on-> save under-> Select 'Data Type': "Textfile - Auto détection (*.csv)"-> Save.

    Result of savings:

    "TIME V V_ABS.
    "63.0235776 28.6153372301571 0.105263157894737".
    "63.0235936 28.6156034598028 0.105264137235745".

    The values of strings with the same index (a header) are so composed of a single cell due to quotation marks around.

    By me is not get, but by a customer.

    Client standard configuration of region/German language Windows 7.

    No idea, how a customer can save as csv without quotes around the line?

    Sasha

    Checked the file format during the recording of the data of Test File (CSV) Portal.

    When I checked the file in Ultraedit (so that can see the hexadecimal values) the file doesn't have quotation marks around the values.

    But if I open the file in Excel and then saved. Excel has put the quotes like that was indicated in your message.

    It seems that the customer opens the file in Excel.

    Paul

  • Extra space after the quotation mark open

    I write fiction. I need to be able to put the dialogue in quotation marks. My problem is that when I ask speech recognition for 'Open-quote' and then start the dialogue, I get an extra space. Like this: "come with me, Jim.

    Does anyone have a solution?

    Hi DennisFoley

    My apologies for not getting back to you sooner, actually I'm surprised that no one else has offered suggestions.

    I've personally never used speech recognition, so I have a question.  I know it's maybe not the right way to "solve" the problem, but you can do it?  When you say quote open or open Double Quote, can you tell us immediately Backspace?

    If I find any useful information, I'll post it here.

    Thank you

    Ken
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Look like quotation marks ' &gt; ' in an InDesign document

    In my work, I am updating an old InDesign CS5 file with new content. Whenever I press on the "or" I get > > or > (not exactly, but it is a symbol that looks like a lot to > > or >). I never had this problem and cannot understand why he did this. There is nothing else in the document which is the symbol of evil when the button is pressed.

    I use a Mac and nothing this Council stereotyped it helps (reset the computer, open and close the program, etc.)

    I also already went into preferences & selected the quotes, then changed the quote settings in preferences > dictionary to be the exact quotes, but it makes no difference. I feel like it should have been the solution to the problem.

    Any ideas? I'm tired of doing good quotation marks in another document and the copy-paste it everytime I want to use a (the only thing that works).

    Nevermind, I Googled it based on a response from M Blackburn and got the solution. I will now explain the solution to the case where someone else who wondered stumbled across this.

    The correct solution is:

    1 select text and go in the character Panel.

    2. in the character Panel, at the bottom there is a drop down that says language. If you have selected the text and the current selection in the drop-down list is empty, this means that there are several languages (in my case, somewhere in the document, the original author of the document used accidentally French, I guess).

    3. change the drop down list for "English: USA".

    I had already changed the language and the two options in the preferences of quote > dictionary article, and this has not changed anything. The French apparently replaces it.

    M Blackburn was right about it being French, but Bob Levine of course which is the solution... I wanted to know how to do it and Jeffrey_Smith I said earlier that I already tried. Please check your answers to ensure that they are worth!

  • How to make a global search in messages between quotation marks?

    Using Thunderbird 24.4.0 on Ubuntu. Is it possible to do a global search in messages between quotation marks? I read https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/gloda, "whittlers Content" section. I consider this description it's a feature to exclude the content of the message in quotes of global search? Is there a way to enable global search in the quoted text?

    You know that a strip search via the quick filter bar or edit/search/search Messages include quoted text? Although it cannot be restricted to the text cited only.

  • Note setting out the numbers in text come into contact with quotation marks.

    Is it possible to find and replace end quotation marks and numbers exhibitor and kern them apart?  Numbers exponent of endnote in Adobe Caslon Pro come in contact with the end quotes that precede them. So any time I have a suite of number of note a quote all the numbers run right in the quotation of brand.

    Example: "quote". 4 (4 should be exposing)

    Can we do a custom search and replace with added kerning between the "and numbers?

    Thank you!

    Thank you. A trailing space is more that I wanted, but it is the smallest available space.  So he has to do. I can do a grep search and use a wildcard character for "any number" and replace it with fine space and 'found sales '.

    I tried, it works!

  • How to escape the quotation mark?

    I need to move a column of link from page 1 to page 2. I found a bug in my program. When there is quotation mark in the string, the corresponding query cannot be displayed on page 2. However, by using the same query, I get the correct result in the SQL * more console. I don't know why. Because of the quotation mark? Thank you!

    Hello

    OK - I've updated my test page to include the date in the filter - [http://apex.oracle.com/pls/otn/f?p=267:126]. I added a new page element called P126_DATE for the date filter

    My SQL for the IR is now:

    SELECT
    ENAME BLAH,
    EMPNO,
    ENAME,
    HIREDATE
    FROM EMP
    WHERE HIREDATE IS NOT NULL
    

    The URL of the link is now:

    #" onclick="javascript:doLink(this, '#HIREDATE#');
    

    My javascript function is now:

    function doLink(o, d)
    {
     $x('P126_TEXT').value = o.innerHTML;
     $x('P126_DATE').value = d;
     doSubmit();
    }
    

    And SQL of the standard report is now:

    SELECT EMPNO, ENAME
    FROM EMP
    WHERE ENAME = :P126_TEXT
    AND TO_CHAR(HIREDATE,'DD/MM/YYYY') = :P126_DATE
    

    Note that the column HIREDATE on the IR has been formatted using JJ/MM/AAAA

    Everything seems to work very well.

    The only time I haven't had "no data" was when I had included all the records in the EMP and clicked on a link for a record that had no value of hiring date. Otherwise, clicking on any link meets the standard report ok. Have you tried using TO_CHAR or TO_DATE to ensure that both sides of the WHERE statement using the same type of data?

    Andy

  • I have a Leica LR but my creative cloud annual subscription has expired, my Lightroom my LR library for 2015 and beyond now has a question mark and I can't open pictures

    I have a subscription valid and active Leica camera.

    How can I get Adobe to recognize? My creative cloud has expired. I'm frozen out of my photo library

    Using the redemption code Leica I downloaded successfully updated day to day LR 6 but my LR library for 2015 and beyond now has a question mark, and I can't open the images.

    Any suggestions?

    Is this something that Adobe has to rectify?

    Thank you

    John

    The question mark has nothing to do with your subscription at the end. The question mark on your records indicates that Lightroom cannot find the photos, because they have been moved or renamed, or delete outside of Lightroom. The instructions to fix it are: Adobe Lightroom - find folders and files moved or missing

  • I want to use the quotation marks in the search box

    I want to use quotation marks in the search box.

    So let's see, you try to find all the photos with the exact keyword Fotograaf: My Name

    Go to the keyword list Panel, point your mouse on the desired keyword, an arrow appears to the right, click on this button.

  • What happened with my CC of Photoshop and it's Plug - ins, all disappeared... There where the Photoshop logo was in the dock is now a big question mark...?

    What happened with my CC of Photoshop and it's Plug - ins, all disappeared... There where the Photoshop logo was in the dock is now a big question mark...?

    Please see: cannot install Add Ons for the Creative Cloud 2015 products

    You can also check: the basics of the Mac: the Dock holds your favorite applications, documents and more - Apple Support

    Let us know if that helps.

  • Characters such as apostrophes and the french quotes turn into boxes or question marks

    We recently upgraded from CF5 to CF7 and encounter a problem with the previously saved text more correctly displayed. Some characters (apparently, non-ASCII characters as curly apostrophes and quotation marks) are made in the form of boxes or question marks. We have recently upgraded to Oracle 10 g to Oracle 8i, but this problem appears to be independent of the database stored in the text. Some examples of code that illustrates the problem:

    < CFSET string1 = 'Department' >
    < CFSET string2 = "' Hey - it" > "

    < CFOUTPUT >
    string1 is #string1 #.
    < BR >
    string2 is #string2 #.
    < / CFOUTPUT >

    output looks like this:

    string1 is Department? s
    string2 is good? He

    These are rendered as boxes seen in Internet Explorer. (They appear as question marks when I copy and paste here.)

    The UDF Demoronize helps to * some * of the time, but it's past still with lots of text, in particular the text that gets pasted from a Web site into a form, and then saved in a database. Does anyone have a solution for this? It is breaking my apps and incredibly annoying. I would like to either replace the problematic characters by the time they are displayed, or the replacement when they are entered into the database first place (and go back and update all previously recorded data to replace problematic characters with plain text equivalents).

    Any suggestion is appreciated.

    Finally, I've isolated the problematic characters so I edited the UDF (available at cflib.org) DeMoronize by adding replacements following text at the bottom:

    text = Replace (text, chr (8208), "-", "ALL");
    text = Replace (text, chr (8209), "-", "ALL");
    text = Replace (text, chr (8210), "-", "ALL");
    text = Replace (text, chr (8211), "-", "ALL");
    text = Replace (text, chr (8212), "-", "ALL");
    text = Replace (text, chr (8213), "-", "ALL");
    text = Replace (text, chr (8214), "|", "ALL");
    text = Replace (text, chr (8215), "_", "ALL");
    text = Replace (text, chr (8216), "'", "ALL");
    text = Replace (text, chr (8217), "'", "ALL");
    text = Replace (text, chr (8218), ",", "ALL");
    text = Replace (text, chr (8219), "'", "ALL");
    text = Replace (text, chr (8220), "" "," ALL");
    text = Replace (text, chr (8221), "" "," ALL");
    text = Replace (text, chr (8222), "" "," ALL");
    text = Replace (text, chr (8223), "" "," ALL");
    text = Replace (text, chr (8226), "·", "ALL");
    text = Replace (text, chr (8227), ">", "ALL");
    text = Replace (text, chr (8228), ".", "ALL");
    text = Replace (text, chr (8229), "..", "ALL");
    text = Replace (text, chr (8230), "...", "ALL");
    text = Replace (text, chr (8231), "·", "ALL");

  • Quotation marks look like double comma

    Hey everybody!

    I ran into a problem annoying since update to El Capitan on my iMac 2011 21.5 mid

    When I'm trying to put something in quotes, the first quote mark resembles a double comma ("") instead of a double apostrophe (""). I noticed in Mail and Word.

    Any ideas?

    Check the language setting you use in system preferences and similar settings in Word. Low quotes are used in several languages of Central and Eastern Europe rather than English analogues opening quote characters.

Maybe you are looking for