Control Characters in Data

I've created a simple table with 2 rows. When I query the table for an individual row (where id = 1), my return set has control characters in between 2 columns...sometimes.
If I select * from the table, I get a core dump, then a Oracle sqlplus error message that wants to send a report to Microsoft. Once I decide to send/not send the message, sqlplus blows away.
These 2 rows are actually 2 rows in a much larger table. I encountered this problem in the larger table, thought my data was corrupted, so I created the exact same table, in a totally different schema, and pasted the data in the new table. When I received the same error, I dropped the table, recreated it, and hand entered all the data, with the same results.
Table structure:
id NUMBER(9) PRIMARY KEY
TABLE_ID NUMBER(9)
FILTER_ONE VARCHAR2(800)
FILTER_TWO VARCHAR2(100)
CLASS_FILTER VARCHAR2(1)
If I select* FROM test_table WHERE ID = 27, my result set looks like this:
'blah blah (' ☻ '))' ☺ 'Y'
The 1st open parenthesis is the end of the filter_one column, the double parenthesis is the entire filter_two, and the Y is the class filter. The control characters come from I know not where, but my app cannot function - this is a dynamically built query and the query of course fails because sqlplus can't interpret the control characters.
Anyone ever heard of this? I should also mention that this query has worked for the past year, and has not been changed - it just suddenly stopped working.
Thanks!
Dave

Sure -
CREATE TABLE TEST (
ID NUMBER(9) PRIMARY KEY,
TABLE_ID NUMBER(9),
FILTER_ONE VARCHAR2(800),
FILTER_TWO VARCHAR2(100),
CLASS_FILTER VARCHAR2(1) )
INSERT INTO test VALUES(
27,38,'where id in (select decode(pci.config_comp_int_id,null,decode(pci.component_id,null,pci.spirit_comp_id, pci.component_id),
decode(cci.component_id,null,cci.component_id, cci.spirit_comp_id)) from c3net_units u
join (select uc.*,connect_by_root(unit_id) top_unit_id
from c3net_unit_config_int uc start with uc.unit_id is not null connect by prior uc.id = uc.parent_id) uci
on (u.id = uci.top_unit_id)
left join (c3net_unit_plat_int upi join c3net_plat_comp_int pci on
( upi.id = pci.unit_plat_int_id)) on ( uci.id = upi.unit_config_int_id)
left join (c3net_config_plat_int cpi join c3net_config_comp_int cci on (cpi.id = cci.config_plat_int_id))
on (uci.config_id = cpi.config_id) where u.version_id in (',
'))','Y');
INSERT INTO test VALUES(
28,39,'where id in (select decode(upi.config_plat_int_id,null,decode(upi.platform_id,null,upi.spirit_plat_id,
upi.platform_id),
decode(cpi.platform_id,null,cpi.spirit_plat_id, cpi.platform_id)) from c3net_units u
join (select uc.*,connect_by_root(unit_id) top_unit_id
from c3net_unit_config_int uc start with uc.unit_id is not null connect by prior uc.id = uc.parent_id) uci
on (u.id = uci.top_unit_id)
left join c3net_unit_plat_int upi on ( uci.id = upi.unit_config_int_id)
left join c3net_config_plat_int cpi on (uci.config_id = cpi.config_id) where u.version_id in (',
'))','Y');
When I then "select * from test where id = 27;" I get strange data - looks like control characters - in the filter_one and filter_two fields
When I change the id to 28 and re-query, it gives me the core dump and sqlplus error.
Thanks for your time guys

Similar Messages

  • Converting control characters to spaces in a Unicode program?

    I want to take an ASCII character string and convert any
    ASCII Control Characters to Spaces.
    In a non-Unicode program, I define the following hex constant:
    CONSTANTS: c_control_to_space(64) TYPE x VALUE
      '00200120022003200420052006200720082009200A200B200C200D200E200F20' &
      '10201120122013201420012016201720182019201A201B201C201D201E201F20'.
    I then execute the following TRANSLATE statement:
          TRANSLATE w_transcript USING c_control_to_space.
    What would be the "approved" method of accomplishing the same effect
    in a Unicode program?

    Neil,
    First, thank you for pointing out my typo. You are correct that the "0120" in the second line of the literal was intended to be "1520".
    Second, thank you for your suggestion. Based on your idea, I tried something similar, but not exactly what you suggested. In particular, since I can't figure out how to construct the constant that I want, I used your idea to construct it as  a variable, as follows:
      DATA number TYPE i.
      DATA offset TYPE i.
      DATA hex(4) TYPE x.
      FIELD-SYMBOLS <char> TYPE c.
      ASSIGN hex TO <char> CASTING TYPE c.
      DATA w_control_to_space(64) TYPE c.
      DO 32 TIMES.
        hex = sy-index - 1.
        offset = 2 * ( sy-index - 1 ).
        number = STRLEN( <char> ).
        IF number GT 1.
          SUBTRACT 1 FROM number.
          SHIFT <char> LEFT BY number PLACES.
        ENDIF.
        w_control_to_space+offset(1) = <char>.
      ENDDO.
    After having constructed "w_control_to_space", I can now use the TRANSLATE statement:
      TRANSLATE w_transcript USING w_control_to_space.
    This code passes the Unicode syntax checks and works correctly on a non-Unicode system. I don't have access to a Unicode system on which to run it. I'd appreciate any feedback on this approach - especially if someone can actually test it on a Unicode system.

  • Hidden control characters in file generated by AppleScript?

    Hi all,
    I've come across a strange problem. I have an AppleScript app (kindly produced for me by a member here) that gets called up by cron, which puts up a dialog box at regular intervals asking me to write down what I am doing (to create an activity log). The log is saved to my Documents folder if it doesn't already exist; otherwise my typing will just get time-stamped and added to the file.
    This has been working just fine for several months (years), and now, all of a sudden, AppleScript konks out on me -- it simply crashes. The reason, I discovered, is the log file itself. It gets inflated out of proportions (something like 2.5 Megs where 40K would suffice) because it contains hidden control characters (gremlins) between each letter and zillions of them between words and lines.
    When the script opens this inflated file, TextEdit balks ('Application not responding'), which in turn crashes AppleScript.
    I discovered these gremlins when I opened the document in Classic mode with Word 5, which allows me to remove them and thus make the file smaller and therefore palatable to TextEdit again.
    But that doesn't solve the problem: Every entry continues to be inserted with another load of gremlins, and I can't understand why. I deleted preferences both for TextEdit and AppleScript, and I perform regular disk maintenance.
    TextEdit is set to save plain text files, end-of-line is Macintosh style, character set is Western Mac OS Roman. It's always been like this before when it worked ok.
    Any ideas?
    Thanks in advance.
    G4 MDD 1.25 GHz, 768 MB RAM Mac OS X (10.3.9)

    Hi Camelot,
    The script doesn't specify TextEdit -- it just creates/updates a text file which I then read with TextEdit. Here's the script, and below is the link to the test log:
    --STARTOFSCRIPT------------------------------------------
    -- Find out if the log file is actually there.
    -- We can't get the last entry of a file that doesn't exist.
    set fileExists to false
    tell application "Finder"
    if exists file "MacHD:Users:gisela:Documents:Gisela'sActivityLog.txt" then set fileExists to true
    end tell
    -- Get the last entry in the log file to present to the user.
    -- If the file wasn't there, present a default choice to the user.
    if fileExists then
    set myLogFile to open for access ((path to documents folder as text) & "Gisela'sActivityLog.txt")
    set logFileContents to read myLogFile using delimiter return
    close access myLogFile
    set lastLogEntry to last item of text items of logFileContents
    set oldTIDs to AppleScript's text item delimiters
    set AppleScript's text item delimiters to tab
    set lastEntry to text item 2 of lastLogEntry
    set AppleScript's text item delimiters to oldTIDs
    else
    set lastEntry to "Nothin' much."
    end if
    -- Ask the user what they're doing.
    set myLogEntry to text returned of (display dialog "So... What're you doing?" default answer lastEntry buttons {"OK"} default button "OK" with icon note)
    -- Get the date and time via "Do Shell Script" (for me, easier than mucking with AppleScript's date results).
    -- Modified order to Year Month Day# Weekday hour:min:sec [Gisela]
    set dateUnix to do shell script "date"
    set dateText to word 8 of dateUnix & " " & word 2 of dateUnix & " " & word 3 of dateUnix & " " & word 1 of dateUnix & " " & word 4 of dateUnix & ":" & word 5 of dateUnix & ":" & word 6 of dateUnix & " " & tab
    -- Open a log file on the desktop. The file is created if it doesn't exist.
    set myLogFile to open for access ((path to documents folder as text) & "Gisela'sActivityLog.txt") with write permission
    -- Write a log entry into the file.
    write dateText & myLogEntry & return to myLogFile starting at eof
    -- Close the log file.
    close access myLogFile
    -- Script by Bryan K. Vines, Corpus Christi, TX, via Apple Discussion Forum 22/5/04 and 24/5/04
    --ENDOFSCRIPT------------------------------------------
    Here's the test log => http://www.webalice.it/gisela/TestLog.txt. Had to change the name because my webspace doesn't like apostrophes (').
    This phenomenon only occurs in connection with this Activity log script. My gut tells me it's not AppleScript's fault, but I can't figure out where else to look.
    Kind regards,
    Gisela

  • Web services and control characters

    Hi,
    We are using JAXWS and JAXB to create web services. We have a problem with our current data because it sometimes contains "bad" characters, such as control characters. Is there a nice way for us to remove these characters when creating the messages or when retrieving the data from the database? We use java persistence / hibernate to retrieve the data from the database.
    I would prefer a method that doesn't include having to "clean" each string manually...
    Thanks!

    hi, i�m doing something like you but in jbuilder that is another IDE, i don�t know if it is useful for you but i entered to the help of jbuilder and i wrote in the index "web services" and then i found a topic called : "export classes as webservices" and in that place i can see some steps to follow, may be in eclipse you can find something like this.

  • Input stream with control characters

    I am using the HTTPRequest to get data from a MySQL varchar(3000) field.
    when I read the data I get the following error message.
    Exception in thread "AWT-EventQueue-0" (1,670) com.sun.javafx.data.pull.impl.StreamException: Control character is not allowed inside string
    The MySQL field does have things like CR's that I need to allow the user to enter.
    QUESTION:
    How can I capture data with control characters?

    The MySQL column type is varchar(3000) basically a string of 3000 characters to my understanding

  • How to write control file below data

    Hi,
    Here is my table
    create table sample1 (name varchar2(5), num number(2));
    sample.txt(Datafile)
    vikram12
    sharma13
    sonu 14
    Here is my control file
    load data
    infile 'C:\sample.txt'
    into table sample1
    fields terminated by "," optionally enclosed by '"'          
    ( name char(5), num char(2) )
    But it rejecting all the records. Just let me know where i went wrong.
    Thanks in advance

    fields terminated by "," optionally enclosed by
    '"'          As per your control file, the fields have to be seperated by commas but in your datafile it is seperated by space. Either change the delimiter in your control file or in your datafile
    Using Comma Seperated file,
    sample.txt(Datafile)
    vikram,12
    sharma,13
    sonu, 14
    load data
    infile 'C:\sample.txt'
    into table sample1
    fields terminated by ","
    optionally enclosed by '"'
    ( name char(5),
    num char(2)
    )Note:
    1. You have to increase the length of name column as your datafile has values greater than 5 characters. First and second records will be rejected with NAME VARCHAR2(5)

  • Control characters

    When using control characters like '}', '@' , '*' in the search string which gives a null result set, the user sees a proper message(no results found), but the log file is dumped with encrypted data.
    Whats the problem?
    Any help is appreciated.

    interMedia text is now Oracle Text and has it's own forum. You might get better response if you post your question there.
    Larry
    http://forums.oracle.com/forums/forum.jsp?id=477576

  • Removing unwanted control characters in exported text files

    I am currently evaluating Crystal Reports 2008 to determine applicability to our requirements. I need to export data files to continuous text to be read by other application software. I have successfully created the files but have what I believe to be page feed or end-of-page control characters (small rectangles) in the output. Can someone enlighten me as to how I can suppress or remove these control characters?

    In the export to text options enter 0 for the number of lines per page. This will produce an unpaginated text document without the page control markers.

  • Help writting a file without crlf control characters

    Hi All,
    I have a little trouble when writting a file in UTF-8 format, It's only one string  and this string is writting to a file in UTF-8 format but I need to omitt the CR-LF Control Characters of the file generated.
    OS - HP-UX
    How can I do  this?
    here is the sample code:
    DATA: g_cadena TYPE string,
               g_filcad    TYPE string.
    DATA: l_len TYPE i,
              l_msg TYPE string.
      CONCATENATE '||A|1|2005-09-02T16:30:00|1|ISP900909Q88|'
                  'Industrias del Sur Poniente, S.A. de C.V.|'
                  'Alvaro Obregón|37|3|Col. Roma Norte|México|'
                  'Cuauhtémoc|Distrito Federal|México|06700|'
                  'Pino Suarez|23|Centro|Monterrey|Monterrey|Nuevo Léon|'
                  'México|95460|CAUR390312S87|Rosa María Calderón Uriegas|'
                  'Topochico|52|Jardines del Valle|Monterrey|Monterrey|'
                  'Nuevo León|México|95465|10|Caja|Vasos decorados|20|200|1|'
                  'pieza|Charola metálica|150|150|IVA|52.5||'
            INTO g_cadena.
      l_len = STRLEN( g_cadena ).
      CLEAR g_filcad.
      g_filcad =  '/usr/home/cadena.txt'.
      OPEN DATASET g_filcad
         FOR OUTPUT MESSAGE l_msg IN TEXT MODE ENCODING UTF-8.
      IF sy-subrc NE 0.
        WRITE: / 'Message:', l_msg.
        RETURN.
      ENDIF.
      TRANSFER g_cadena TO g_filcad LENGTH l_len.
      CLOSE DATASET g_filcad.

    Thanks to all.
    I solved by my self.
    Regards

  • Invalid Characters during data load

    Hi All,
    We are in BI7 and its unicode compliant with code page 4102.
    My setting in RSKC is ALL_CAPITAL. When i tried loading data from the source system, i got many error records in BW saying that it has invalid characters. On debugging, i found that hexadecimals 00-1F comes as part of the record. Why control characters like 00-1F are not allowed in BW by default? I changed the RSKC setting to ALL_CAPITAL_PLUS_HEX, but its of no use.
    when i checked in i18n transaction, i could see that code 4102 can accept all control characters.
    Is there any setting that has to be made in order to allow hexadecimals in BW [ without converting it in to space using a routine ]?
    Thanks and Regards
    Amith

    Hi Amith Anand,
    Please
    check
    Program
    RSKC_ALLOWED_CHAR_MAINTAIN
    Or
    RSKCCHECK
    Let me know.
    Regards
    Hari

  • Wrong ASCII values for control characters in Variables and Stack Call in CVI2013?

    Hi,
    I think there is an error in  "Variables and Call Stack" window if you want to look for your variables in ASCII format.
    The control characters (0 -  31) are not shown correct. They are shifted 2.
    For example:
    Character in Decimal format is 10 (LF) but when you are chancing to ASCII format it is showing \012.
    The same with 13 (CR). This character is \015 in ASCII format.
    I think that was no problem in CVI2012.
    Best regards
    Gunther
    Solved!
    Go to Solution.

    I'm not using CVI2013 yes so I cannot respond regarding this specific product, but the code you are showing are the octal equivalent of the decimal value you specified: it could be that control characters (or generally speacking non-printable ones) are replaced with their octal equivalent in string view.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How can I use table control to enter data

    Hi all,
    I want to use table control to enter data, instead of using textboxes.
    So that the user can enter many data at once and just click the save button at the end of the work, only one click.
    How can I use the table control at this context?
    Thanks.
    Deniz.

    Hi deniz,
    go through it:
    /people/ravishankar.rajan/blog/2007/02/23/an-easier-way-of-displaying-and-editing-data-using-table-control
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/code%2bto%2bhandle%2bmultiple%2brecords%2bin%2bbdc%2btable%2bcontrol
    Regards,

  • Control the Post Date  when use BAPI_OUTB_DELIVERY_CONFIRM_DEC to PGI !

    Dear all,
       How can I control the Post Date (WADAT_IST) when I use BAPI_OUTB_DELIVERY_CONFIRM_DEC to PGI?
    Thanks to help me.

    In ECC 6.0, I used this BAPI to perform the picking using this way:
    1. Implement enhancement point  BAPI_OUTB_DELIVERY_CONFIRM_D01 in enhancemnt spot ES_SAPLV50I to set the update picking flag on delivery control structure.
    GS_DLV_BAPI_CONTROL-UPDATE_PICKING = 'X'
    2. Implement enhancement of standard BADI SMOD_V50B0001. Use method EXIT_SAPLV50I_004 to loop at table CT_VBPOK and update the fields VBELN and POSNN with suitable values.
    There is one problem with this solution, though.  The delivery quantity cannot be updated.  Any increase in the delivery qty ITEM_DATA-DLV_QTY actually updates the picked quantity on the delivery.  Consequently, there is little practical use of this technique.
    John

  • Control actual GI date using BAPI_OUTB_DELIVERY_CONFIRM_DEC

    Hi Guys:
                 I am using BAPI_OUTB_DELIVERY_CONFIRM_DEC to perform PGI against delivery order automaticlly.
                 But I find this BAPI can't specify the actual GI date,and SAP just default current date as GI date.
                 Is there any parameter can control this GI date for this BAPI?
                Or any other solution?
                Thanks.
    Stephen

    Hi Junwen,
    Did you call the BAPI_TRANSACTION_COMMIT afterwards?
    Before this the data is not saved. After that it is saved.
    Regards,
    Rob.

  • How to Search for a Date in a string having both characters and date

    Hi ,
      I have a requirement to search DATE in the String having Both Characters and DATE . Please kindly let me know as early as possible.
    Regards
    Anil Kumar K

    Try to use SEARCH command with the pattern, making the pattern as fine as it can, like if you have your date in the format 02/23/2007, you can give
    SEARCH STRING FOR ' //'. (assuming the date has at least a single blank before it)
    WRITE:  SY-SUBRC UNDER 'SY-SUBRC',
    SY-FDPOS UNDER 'SY-FDPOS'.
    SY-FDPOS is set to offset of the string from which you can get the date value
    Refer here
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb33cc358411d1829f0000e829fbfe/frameset.htm
    It would have been better if there is something like UNIX "regular expression" matching in ABAP

Maybe you are looking for

  • Hiding a table field

    I have a maintenance view for my custom table. I have a key field which i want to hide . In the layout,  the property is disabled,, i mean i cannot make it display->invisible ON. How to do this? do we have something like LOOP AT SCREEN here also . Re

  • ORA-12505 on Oracle Database 10g Express Edition: TNS:listener

    In Developer3, trying to connect to Oracle Database 10g Express Edition give me: Listener refused the connection with the following error: ORA-12505 TNS:listener does not currently know of SID given in connect descriptor Vendor code 12505 Edited by:

  • If I buy more storage how does it work

    If I buy more storage from cloud how does that work and will I be able to buy more movies.

  • Why isn't after effects showing in my creative cloud ?

    im not sure why after effects isn't on my creative cloud list, could someone please let me know why ? When i click on download trial on the internet it takes me to creative cloud and after effects isn't there !

  • Can someone submit my podcast please

    Im in New Zealand, dont have a iTunes music store here, so can add it myself. http://feeds.feedburner.com/PimpAndHoe-Podcasts Thanks