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/

Tags: Database

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

  • 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) #.

  • 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.

  • '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

  • 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

  • Whenever I have to copy/paste the results include many points of mark boring... are not part of the original text.

    Whenever I have to copy/paste the results include many points of mark boring... are not part of the original text.  I use wordperfect 12 with Windows XP.

    How can I solve this dilemma?

    Hello, Roger Scott,.

    -Does only with WordPerfect or with other applications as well?

    If this only happens with WordPerfect so I suggest you to check with WordPerfect support for more information.

    http://www.Corel.com/Corel/pages/index.jsp?PgId=800034

  • 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.

  • 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.

  • 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!

  • 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!

  • Problem importing and including subfolders without question marks

    I am trying to import a folder of vacation pictures. It has 5000 photos and there are many subfolders. It is important where I want to, but it gives me question marks on all subfolders. And subfolders are empty, even if he tells me how many photos in the folder. I right click the question marked records, then point out where they are, and he's saying they're already here and I want to merge the files. In the import I said to include subfolders. I tried this twice and each time the same results. Very frustrating to have to scroll through thousands of photos. what I am doing wrong.

    What happens if you right-click on the E in folder in the library and select hide this Parent. You can make it go again.

  • 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.

  • I'm unable to type the quotation marks or use a rear brace.

    First of all, I don't have this problem if I use Internet Explorer, I don't like. I'm unable to type some kinds of special mark - Apostrophe, slash - or back space, space before or hit end. A strange thing arises at the bottom of page whoing what I am typing there.

    This has happened

    Each time Firefox opened

    Is about 3-4 weeks ago

    See http://kb.mozillazine.org/Find_bar_opens_when_typing_in_textbox

  • Remove the quotation marks the names of channel

    First of all - I'm new to tiara and VB so please forgive my ignorance!

    I have a large data set containing several groups with the same names (or almost) in each group. For reasons not worth going in channel names have quoation marks around them, while others do not.

    I'm trying to remove the quoation marks to standardize all channel names in groups, to do hoped to browse channels renaming groups as the case

    I think it should work: -.

    For

    i = 1 to GROUPCOUNT

    Call GROUPDEFAULTSET (i)

    CN (""ChannelName"" "") = "ChannelName".

    Next

    ChannelName, where is the name that I am trying to replace, but I get the following error:-expected ')'

    Can someone point out where I'm wrong?

    (Note: I also tried to use triple quotes ('' ' ChannelName' ' "), but I get this error instead - CN (" "ChannelName" "" "): = ChannelName Close support" ") ("expected for the index fields)

    Bonus points - how to get the loop jump over all groups where the channel that I'm already referencing isn't quotes in it, rather than giving me an error that the channel can not be found?

    Thank you very much in advance for any help!

    Dan

    Hello Dan,.

    You use the old syntax of script to manipulate the data. Please find below the current way to replace the double quotes with a underscote:

    Dim iLoopG, iLoopC, oGroup, oGroupChns m²

    m² = Chr (34) "character".

    Set oGroup = Data.Root.ChannelGroups

    iLoopG = 1 to oGroup.Count
    Set oGroupChns = oGroup (iLoopG). Channels
    iLoopC = 1 to oGroupChns.Count
    ' msgbox oGroupChns (iLoopC). Name
    oGroupChns (iLoopC). Name = Replace (oGroupChns (iLoopC). Name, m², '_')
    next
    next

    Greetings

    Walter

Maybe you are looking for

  • Get the error in firefox sign extensions

    After download of packages of Mozilla firefox sign web site. I use this link to SIGN extensions. https://developer.Mozilla.org/en-us/docs/Signing_a_XPI After the whole way, I try to use this command: certutil n - d. to create a test certificate, but

  • Why can not download links in Ff 6.0.2 used to download easily in Ff 3.6?

    Asked this question 3 weeks ago, but no response. Links which have been readily available before, such as www.washingtonpost.com and movies.nytimes.com,It no longer appears. When I use another browser - IE - the same links pop up immediately.But, of

  • Help, please! Try to remove tuneup helper of my iMac.

    I'm trying to remove my iMac tuneuphelper. I found most of the files and added to the trash. When I'm empty, I get a message "the operation cannot complete because the point help of tuneup is in use" I can't find an icon to exit the program. Activity

  • Apple tv Gaming Controller

    I use Apple TV 4th generation in Turkey. There is only one controller games available is Kontorland YEAR-200, which is a controller of the IFM. It works with all other apple products (IE. IPad, Iphone) without any problem. Apple TV 4th generation eve

  • My PC does not detect my DVD ROM or DVD - RW

    My PC does not detect my DVD player or my DVD - RW on pc.  This happened only since I reinstalled XP Home Edition.  I can't watch the discs, play music, or load any software on the system.  I tried Microsoft Fixit and even remove the material in my d