Problem with single quote when exporting insert statement

Hi
I'm using Oracle SQL Developer 2.1.1.64 on Ubuntu 10.04. I got some records which has single quote in it.
For example,
Let says Table '*TABLE_A*' has varchar2 column called '*COL_A*'.
And there is only one record in the table and the value is:
his friend's dog name is dog.
When I export that table data to insert statement, i got this:
Insert into TABLE_A (COL_A) VALUES ('his friend's dog name is dog.');
As you can see friend's is wrong, it should be friend''s instead. (note the double single quotes).
Anyone knows how to fix this please?

Yes - that's a bug. But probably not what you're expecting.
Mind you really can't use "normal" SQL on LOBs, because they're just too big to fit in the statements.
You should export and import them through e.g. the DBMS_LOB package.
I do remember some request on the SQL Developer Exchange to automate this, so go vote there to add weight for future implementation.
So the bug is that the column's fields should all yield NULL inside the INSERTs.
Regards,
K.

Similar Messages

  • Is there a bug or problem with increased noise when exporting pictures out of Lightroom 4?

    Is there a bug or problem with increased noise when exporting pictures out of Lightroom 4?

    As you are asking about it, looks like you do see a problem. So if googling does not provide a solution, you should describe the issue in detail so we can try to help out.

  • Importing excel files - problem with single quote

    When importing excel files using 1.5, I can't get data with single quotes (') imported.
    When I run the insert statement given in SQLPlus I get "ORA-01756: quoted string not properly terminated", which is different than the error that SQL Developer gives me (see below).
    Also, I have a numeric value shown without a thousands comma-separator in the XLS file that I'm trying to load into a varchar2 field. But, the insert statements have added a thousands comma-separator which I don't want.
    REM Error starting at line 1 in command:
    REM INSERT INTO table (ID, NAME, CODE)
    REM VALUES (2427407, 'Ed-u-care Children's Center', '73,000');
    REM Error at Command Line:2 Column:37
    REM Error report:
    REM SQL Error: ORA-00917: missing comma
    REM 00917. 00000 - "missing comma"
    REM *Cause:   
    REM *Action:
    One last thing, TOAD gives a way to automap columns chosen from XLS to the columns in the database. It sure would be nice to have this functionality in SQL Developer.
    Thanks,
    Steve

    Did you consider both to be bugs (i.e., single quote issue and thousands comma separator issue)?
    Thanks

  • PE3 problems with video quality when exporting

    I've had this issue when putting DVD movies I own onto my iPod, but because I'm doing a client video now, it's crucial that I get the highest possible video and sound quality out of my project. Because the project I'm working on will be about 45 minutes long, I wanted to avoid working on the whole thing in one file since Premiere begins to refuse to let me do the simplest functions if I have too many clips in the timeline. I've been splitting the project up into segments and my plan is to export them and work with them as single clips when compiling the final project together.
    Now here's my problem: I export the segments as HDV 1080 60i files for the highest quality possible, but whenever the exported file is played, these horizontal lines appear on the screen. It's as if the colors are smeared a bit. I honestly don't know how else to describe it. On an iPod, it's only slightly noticeable, but on TV screens like this project will be played on, it'll be too distracting to be acceptable. Can anyone help me out here?

    No, all I'm trying to do is export it to the highest quality video so it can be put back into Premiere to be exported again along with several other clips (also exported in the same way). From there, I'll use different software to burn the entire file onto a DVD. No Blu-Ray, no camcorders, not even firewire connections (my computer doesn't have any). It's just going to be used by some 150 families to be viewed on their DVD players once the product is finished.

  • Problem with single quote around ANYINTERACT

    CREATE TABLE JUNK
    as SELECT s.survey_id,s.shape,s.original_depth
    FROM bathyuser.sounding s,m_covr r
    WHERE SDO_GEOM.RELATE (s.shape, 'ANYINTERACT', R.geom, 0.5) = 'TRUE'
    AND R.DSNM=CNT.DSNM
    and
    s.SURVEY_ID in
    (SELECT unique s.survey_id FROM header s, m_covr r
    WHERE SDO_GEOM.RELATE (s.shape, 'ANYINTERACT', r.geom, 0.5) = 'TRUE'
    AND DSNM=CNT.DSNM)';
    This above SQL works fine in SQL prompt. But when I put it together in PL/SQL it gives me this error :
    WHERE SDO_GEOM.RELATE (s.shape, 'ANYINTERACT', R.geom, 0.5) = 'TRUE'
    ERROR at line 17:
    ORA-06550: line 17, column 39:
    PLS-00103: Encountered the symbol "ANYINTERACT" when expecting one of the
    following:
    * & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
    LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
    Could someone help me fix this error. I know I have to try it with "EXECUTE IMMEDIATE" command, but I'm having problem with "||" (concatinate).
    Thanks so much
    Cuong

    This is how you go about debugging execute immediate statements. I am assuming that you fixed the first problem as marias suggested and cam up with something like this. Note, I changed the table in your surso to dual since I do not have your tables, but the effect is the same. I changed the EXECUTE IMMEDIATE to DBMS_OUTPUT.Put_Line so you can actually see what you are trying to execute. I also added some carriage returns to make the formatting a littel easier to see. This is what I got:
    SQL> DECLARE
      2     statement varchar2(1000);
      3  CURSOR C_DSNM5 IS
      4     SELECT dummy dsnm FROM dual;
      5  BEGIN
      6     FOR CNT IN C_DSNM5 LOOP
      7        STATEMENT := 'CREATE TABLE JUNK'||
      8                     ' AS SELECT s.survey_id,s.shape,s.original_depth'||CHR(10)||
      9                     ' FROM bathyuser.sounding s,m_covr r '||CHR(10)||
    10                     'WHERE SDO_GEOM.RELATE (s.shape, '||
    11                     '''ANYINTERACT'''||
    12                     ', R.geom, 0.5) = '||'''TRUE'''||CHR(10)||
    13                     ' AND R.DSNM = CNT.DSNM '||CHR(10)||
    14                     ' AND s.SURVEY_ID IN '||
    15                     ' (SELECT UNIQUE s.survey_id FROM HEADER s, m_covr r'||CHR(10)||
    16                     ' WHERE SDO_GEOM.RELATE (s.shape, '||
    17                     '''ANYINTERACT'''||
    18                     ', r.geom, 0.5) = '||
    19                     '''TRUE'''||CHR(10)||
    20                     ' AND R.DSNM = '||CNT.DSNM||' )';
    21        DBMS_OUTPUT.Put_Line (statement);
    22     END LOOP;
    23  END;
    24  /
    CREATE TABLE JUNK AS SELECT s.survey_id,s.shape,s.original_depth
    FROM bathyuser.sounding s,m_covr r
    WHERE SDO_GEOM.RELATE (s.shape, 'ANYINTERACT', R.geom, 0.5) = 'TRUE'
    AND R.DSNM = CNT.DSNM
    AND s.SURVEY_ID IN  (SELECT UNIQUE s.survey_id FROM HEADER s, m_covr r
    WHERE SDO_GEOM.RELATE (s.shape, 'ANYINTERACT', r.geom, 0.5) = 'TRUE'
    AND R.DSNM = X )
    PL/SQL procedure successfully completed.You have at least two issues with this CREATE TABLE statement. The last line needs to have the X (which came from dual) quoted since it is a string. You also still have a reference to CNT.DSNM, unless you fixed both occurences.
    Another major problem is that if your cursor will return more than one row, and by the structure of this I assume that it might, the on the second record you are going to get:
    ORA-00955: name is already used by an existing object.
    Although I see no reason why you need dynamic sql here, you really need to use bind variables whereever possible (everywhere you use a variable except ofr names of database objects. So, your procedure should look more like:
    DECLARE
       statement varchar2(1000);
       CURSOR C_DSNM5 IS
          SELECT distinct DSNM from M_COVR where dsnm like 'US5%';
    BEGIN
       FOR CNT IN C_DSNM5 LOOP
          STATEMENT := 'CREATE TABLE JUNK'||
                       ' AS SELECT s.survey_id,s.shape,s.original_depth'||
                       ' FROM bathyuser.sounding s,m_covr r '||
                       'WHERE SDO_GEOM.RELATE (s.shape, '||
                       '''ANYINTERACT'''||
                       ', R.geom, 0.5) = '||'''TRUE'''||
                       ' AND R.DSNM = :b1 '||
                       ' AND s.SURVEY_ID IN '||
                       ' (SELECT UNIQUE s.survey_id FROM HEADER s, m_covr r'||
                       ' WHERE SDO_GEOM.RELATE (s.shape, '||
                       '''ANYINTERACT'''||
                       ', r.geom, 0.5) = '||
                       '''TRUE'''||
                       ' AND R.DSNM = :b2 )';
          EXECUTE IMMEDIATE statement USING cnt.dsnm, cnt.dsnm
       END LOOP;
    END;But it is still very wrong.
    Perhaps if you can explain in words what you are trying to accomplish someone can provide a much better response.
    John

  • Problems with special characters when exporting to LDAP

    Hi,
    Im using standard report RPLDAP_EXTRACT to export data to LDAP. The problem is that the special characters (in this case polish letters) do not save correctly (we get for instance '?' instead of normal letter)
    I tried switching the configuration of the RFC destination (used: 'found communication Code Page option') but I get a message: "Your selection is restricted" and cannot make any changes.
    Can anyone please help in this matter?
    Regards,
    Hubert

    1) Your database should be able to handle and properly store all the supported charactersets needed. With UTF you are in the clear regarding storing all that kind off idfferent characters
    See http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm
    2) The recieving party (the cleint software) hopefully has a character set that supports all the characters that are offered by the database and can encode them. If not then you get toe upside down question markt or dark squares or something alike. If the client software is a browser, for instance windows internet explorer, then most encoding settings are buildin and you only have to switch. Sometimes you will have to add extra language support on Windows Internet Explorer. This behaviour is also the same on thick clients. Oracle by default sets these parameters in the registry, but on windows the can be overrulled on several levels like on system level, user level (start --> settings -- control panel --> system --> advanced tab --> environment settings) and or during execution via a app. configuration file or an export of the system variable on the command prompt... A unified business approach for how to handle this is needed otherwise you will have too look for these kinds off issues always all over the place (on windows and/or linux etc).
    Have a look at Mark's example of how things work regarding UTF and the like on the FAQ URL on this forum and the URL as show above. If completely lost, you will have to read up on it in the Oracel globalization / NLS manuals and see what is appropriate / can be done in your environment.

  • Problem with Image Quality when Exporting

    I am having an issue with the video quality whenever I export to a .mov or .mpeg file.  Although my film looks good when I'm editing it in Adobe Premiere Elements, whenever I export the quality suffers.  It becomes somewhat blurry, with pixellated lines visible when the camera moves or when things move that I'm filming.  Does anyone know what's going on or how I could fix it?  Thank you very much.
    John

    If you haven't already you need to change the resolution as well.  Like this:
    72ppi is the default which in theory should be fine for on screen viewing, but play around and use what works for you.

  • Problem with Video Quality when exporting to Quicktime or using compressor

    I've attempted exporting a video sequence (stills with transitions, video footage and audio tracks) directly as a QuickTime Movie and using Compressor (Apple-DVD-HD_30 Minutes) for import into DVD Studio. The export process seems to work well for each. Only problem: the video seems to get a bit distorted at random spots. The best way to describe the distortion: images (still and video) seem to blur and squiggle for a few frames at a time. This distortion is especially prevalent during more complex transitions (3 Spins and such). The sequence is nice and clean in Final Cut. I'm only seeing this distortion after export. Thanks for any thoughts you might have on this issue.

    @Harm,
    "Pear-shaped" (or sometimes "fruit-shaped") is a euphemism meaning that the effort has gone awry; it was a mess.
    @John,
    Export to DVD is a PPro 2.0 function; in CS3 it is now Export to Encore. Is that what you meant?
    First thing is to check the field orders of your source material and of your export settings. Don't invert them, and don't deinterlace interlaced footage.
    Perhaps a short list of the settings you have tried (and why you chose those settings) would help us help you.
    -Jeff

  • Problem with the sound when exporting from imovie

    I made a movie in imovie 09. I added music as backgroud and faded the original sounds of the movie to 0%. Everything looks and sounds good when I play the movie in imovie. However when I export the movie (because I want to burn it on a disk) the original sounds/noise comes back in some parts of the movie. How is this possible? I export the movie to Quicktime and to iDVD and it gives the same problem. Does anyone knows a sollution?

    I have just found out that the correct word for "drawing area" is "artboard" in the English language Illustrator version. I use a German language Illustrator, so I'm sorry for misunderstandings concerning this term.
    I have made an Illustrator file that should demonstrate the problem but was not able to find the correct place for bugs in the Production suite at the issue tracker. Would be "Project Nile" the place to put the bug at?

  • Problem with phone layout when I insert the Accordion widget ( since iOS8 )

    Hello,
    The problem appears after I insert the Accordion widget. The phone scales down the entire site, and there are no "lost" or hidden objects in the project. ( screenshot attached ) . This layout worked well before the second October Muse update.
    I have tried a totally new basic website and had the same problem. The accordion takes the screen width.  I have tried to make it smaller then the phone layout, but it remains small.
    Website: www.pronovis.ag
    I am very happy for any possible response,
    Thanks,
    Alex

    Hi jonunes!
    I have an article for you that I believe will help you troubleshoot this issue with your iPhone:
    iPhone: No sound or distorted sound from speaker
    http://support.apple.com/kb/ts5180
    Thanks for coming to the Apple Support Communities!
    Regards,
    Braden

  • Problem with photo quality when exporting interactive pdf

    Hi guys!
    I made a simple pdf with before/after retouching samples with photos overlayed, changing on mouse rollover.
    When I export it as an interactive pdf (on lossless jpeg quality), the photo quality on the final pdf looks like a jpeg on 40% quality, really bad. Rollover works.
    When I export it as a pdf for print on high quality - the photo quality in the final pdf is flawless but rollovers dont work.. (I checked "Interactive Elements: Include Appearance) but still nothing..
    Pleeease help cause I can't find a way. I just need the rollovers to work and to have the photos in the best quality possible.
    Thanks,
    Jelena

    If you haven't already you need to change the resolution as well.  Like this:
    72ppi is the default which in theory should be fine for on screen viewing, but play around and use what works for you.

  • Problems with image names when exporting - images that have come back into lightroom from photoshop

    Can anyone help ? When I need to take an image from lightroom into photoshop then back into lightroom and then I export that image, the original file number disappears and is replaced by dashes. Does anyone know how to solve this ?
    Thanks !

    The appearance of dashes usually suggests some kind of pre-set e.g.
    Wedding-20150106-0001.jpg
    The only suggestion I can make is that you check to ensure you are using the correct parameters in the templates manager.
    Photoshop Lightroom Reference Guide | Create Your Own Custom Filename Presets | Peachpit

  • Firefox is replacing double quotes with single quotes.

    In WordPress and at other sites where I input and save text, Firefox is replacing double quotes with single quotes when I save. It's also showing double quotes as single quotes on websites. I tried uninstalling and reinstalling, and it's still happening.

    Do you have the needed font installed?
    *http://en.wikipedia.org/wiki/Punctuation

  • How to deal with single quote (') in a field value?

    I can successfully insert value with single quoet using
    Prepared statement with placeholder(?) construct .
    I can also successfuly use value with single quote(') in
    WHERE clause.
    My question is, is there a way to use string with single
    quote if a Statement like:
    String slqString ="INSERT INTO customers (name, address) VALUES ( 'O'Reilly Bob', 'St Mary's Street') ";
    Statement sqlStmt = con.createStatement();
    sqlStmt.executeUpdate(sqlString);
    The last statement will thow an SQLException because due to single quotes
    Any ideas?

    I think the question was regarding the ' in O'Reily. Use ' twice when using the Statement interface, i.e.
    ("O''Reilly Bob", "St Mary''s Street")
    So that's two single quotes, not a double quote, to successfully insert a single quote, if you know what I mean....
    But like you said PreparedStatement does things like this for you.

  • Dynamic SQL and Data with Single Quotes in it.

    Hi There,
    I have a problem in that I am using dynamic SQL and it happens that one of the columns does contain single quotes (') in it as part of the data. This causes the resultant dynamic SQL to get confused as the single quote that is part of the data is taken to mean end of sting, when in fact its part of the data. This leaves out a dangling single quote that was meant to enclose the string. Here is my dynamic SQL and the result of the parsed SQL that I have captured:
    ****Dynamic SQL*****
    l_sql:='select NOTE_TEMPLATE_ID '||
    'FROM TMP_NOTE_TEMPLATE_VALUES '||
    'where TRIM(LEGACY_NOTE_CODE)='''||trim(fp_note_code)||''' '||
    'and TRIM(DISPLAY_VALUE)='''||trim(fp_note_text)||''' ';
    execute immediate l_sql INTO l_note_template_id;
    Because the column DISPLAY_VALUE contains data with single quotes, the resultant SQL is:
    ******PARSED SQL************
    select NOTE_TEMPLATE_ID
    FROM TMP_NOTE_TEMPLATE_VALUES
    where TRIM(LEGACY_NOTE_CODE)='INQ' and TRIM(DISPLAY_VALUE)='Cont'd'
    And the problem lies with the single quote between teh characters t and d in the data field for DISPLAY_ITEM. How can I handle this?
    Many thanks,

    I have been reliably informed that if one doesn't enclose char/varchar2 data items in quotes, the right indices may not be usedI am into oracle for past 4 years and for the first time i am hearing this.
    Your reliable source is just wrong. Bind variables are variables that store your value and which are used in SQL. They are the proper way to use values in your SQL. By default all variables in PL/SQL is bind variable.
    When you can do some thing in just straight SQL just do it. Dynamic SQL does not make any sense to me here.
    Thanks,
    Karthick.

Maybe you are looking for