Escaping quotes in select string

I am using Apex 4
I have the following as part of a select string used to generate a report
CASE "VDE_AUDITS"."KQ" WHEN 2 THEN
'<span style="background-color:#F00">Yes</span>'
ELSE 'No'
END AS CQ
When i run the report I get <span style="background-color:#F00">Yes</span> displayed in the column
I have used both Display as Text( escape special characters, does not save state)
and Display as text (Saves state0 with no effect.
Any advice appreciated
Ed.

@sddc my apologies. the forum is 'cleaning out' some of the code in the snippet
there should be a span with a style giving a background colour of #F00 wrapped around the 'Yes' .. .if that makes sense. The forum wont display it
thx Ed.
Edited by: user3608949 on 05-Oct-2010 01:39
Edited by: user3608949 on 05-Oct-2010 01:39

Similar Messages

  • How to replace double quotes with a single quote in a string ?

    Hi All:
    Can some one tell me how to replace double Quote (") in a string with a single quote (') ? I tried to use REPLACE function, but I couldn;t get it worked.
    My example is SELECT REPLACE('STN. "A"', '"', ''') FROM Dual --This one throws an error
    Thanks,
    Dima.

    Whether it is maybe not the more comfortable way, I like the quoting capabitlity from 10g :
    SQL> SELECT REPLACE('STN. "A"', '"', q'(')') FROM Dual;
    REPLACE(
    STN. 'A'{code}
    Nicoals.                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Double Quotes in MaxL Strings

    I am trying to pass in a calc script string from a Perl script to a MaxL script. The calc script needs double quotes around some of the member names (yes, I know I can create aliases with underscores to work around this, but I can't believe this isn't possible). I can escape the double quote characters in Perl, no problem. But the double quotes just get stripped by MaxL. Here is an example:<BR><BR>MAXL> echo 'I am "quoting" this';<BR><BR>I am "quoting" this<BR><BR>MAXL> set X = 'I am "quoting" this';<BR><BR>MAXL> echo $X;<BR><BR>I am quoting this<BR><BR>MAXL><BR><BR>There is nothing in the docs about escaping double quote characters. I've tried using backslash, no luck there. I've tried using double double quotes and they all get stripped. I've tried doing this inside single quoted strings and double quoted strings - no joy whatsoever. The funny thing is the example above, where simply echoing the literal string works, but assigning it to a variable strips out the double quotes.<BR><BR>Does anyone know how to get double quotes into a MaxL string variable? There has to be a way...<BR><BR>Thanks,<BR><BR>James

    Yes, I've dealt with enclosing variables in double quotes in order for MaxL to parse them properly, but what I'm trying to do is use a variable that contains a double quote. Such as:<BR><BR> set QuoteVar = 'I am "quoting" this';<BR><BR>I'm trying to set substitution variables via MaxL, and some of my existing sub vars have double quotes in them so that they can be used to store member names that appear in calc scripts. As I said, I know I can accomplish this with an alias table that creates a version of the member name that doesn't need quotes, but that's a whole deal to maintain just for this one thing and it seems overly burdensome for such a simple task.<BR><BR>Also, as I said, MaxL does fine with double quotes in literal strings, it's only when assigned to variables that it always strips them out. I want to create a relatively generic script for setting sub vars, so I need to pass variables around. Just calling MaxL from Perl and passing in parameters that get converted to $1, $2, etc. causes these double quotes to get stripped.<BR><BR>So, is there any way around this?<BR><BR>Thanks,<BR><BR>James

  • Finding location of single quote ( ' ) in a string

    Hi,
    I have a need to find the location of second single quote in a string.
    Below query works fine for a string without single quote. It gives me the location of word 'HIER' for 2nd occurrence.
    select instr('HIER A HIER B','HIER',2) from dual
    I want to do the same with single quote. I am trying with the below query.
    select instr('HIER A '' HIER B ''',chr(39),2) from dual
    But it always gives me the location of first occurrence of single quote and not the second.
    Any idea about this issue..?
    Thanks

    select regexp_replace('AND ( ACCT_V.HIER_NODE_NM = ''D0100'' AND TODAYS_DATE IS NULL ','.*''(.*)''.*','\1') from dual
    select substr('AND ( ACCT_V.HIER_NODE_NM = ''D0100'' AND TODAYS_DATE IS NULL ',instr('AND ( ACCT_V.HIER_NODE_NM = ''D0100'' AND TODAYS_DATE IS NULL ','''')+1,instr('AND ( ACCT_V.HIER_NODE_NM = ''D0100'' AND TODAYS_DATE IS NULL ','''',1,2)-instr('AND ( ACCT_V.HIER_NODE_NM = ''D0100'' AND TODAYS_DATE IS NULL ','''')-1) from dualComment to the second approach: check SUBSTR() syntax, the second numeric parameter is length of the fragment, not the ending position. Still, RE approach is way shorter and more readable, isn't it? ;)

  • Single quote in the String????

    Hello All,
    I want to supress the meaning of single quote in the string, so that I can use the string as one of the fields in my sql query, for doing this inserting "/" before the single code is the way or is there any other standard way to achieve this.
    Thanks in Advance,
    Sarada.

    usually you need to use the scape character for stopping the meaning of a single qoute, or even double quite \', \"
    String s = "select empname from emps where id=\'123\'" ;
    Regards

  • Pass double-quote inside a string via flashvars and SWFObject?

    Hi All,
    Consider some SWFObject code like this:
    flashvars.data1 = "{&quot;requestId&quot;:14979,&quot;email&quot;:&quot;[email protected]&quot;,&quot;zip&quot;:&quot;12345&quot;}";
    flashvars.data2 = '{"requestId":14979,"email":"[email protected]","zip":"12345"}';
    If I host my SWF in IE, FlexGlobals.topLevelApplication.parameters.data1 will be a string, with double-quotes (&quot; entities will be translated to double quotes).  However, FlexGlobals.topLevelApplication.parameters.data2 will simply be the one-character string "{".
    The opposite is true in Firefox. FlexGlobals.topLevelApplication.parameters.data2 will be a string, with double-quotes (&quot; entities will be translated to double quotes).  However, FlexGlobals.topLevelApplication.parameters.data1 will simply be the one-character string "{".
    How can I pass a double-quote in a flashvar using SWFObject that works in all browsers?  I've been searching on this and haven't been able to find a straight answer...
      -Josh

    This works in both IE, Firefox, and Chrome:
    flashvars.data2 = escape('{"requestId":14979,"email":"[email protected]","zip":"12345"}');
    Is that the way to go if you want double quotes in your string?

  • How to switch on and off displaying of escape sequences in the strings in Visual Studio 2012 during debugging?

    Hi. We have faced a problem on couple of our installations of VS2012. During debugging on these two computers escape sequences in the strings (C++) are not shown (when debugger stops on breakpoint). This creates problems during debugging. On other
    installations escape sequences are shown.
    For example in the first case string value is shown like "abcdef" while in the second case it is shown like "abc\n\t\tdef".
    Where this can be changed?

    This is typically controlled with a format specifier on the debugger expression.  For example, if you have a char* variable called "mystring", then enter the following expressions in your watch window and compare:
    mystring
    "abc\n\tdef"
    mystring,s
    "abc\n\tdef"
    mystring,sb
    abcdef
    the "b" is for "bare" and eliminates quotes and escape sequences.
    There are others such as su, sub, s8, bstr, etc.  See
    Format Specifiers in C++.
    But having said that, now I have to ask:
    Is it native or managed code?
    And where, specifically, in the debugger is this value being displayed?  I ask because there are numerous places where a string can be displayed:  watch window, quick-watch window, data-tips (pinned and unpinned), memory window, text visualizer,
    debug messages, immediate window, command window, etc.
    And, if you are examining a variable, what is its type?   (e.g.: char*, wchar_t*, std::string, std::wstring, etc.)
    And if you are examining a complex debugger expression, what expression did you use?  e.g.: mystring,sb

  • Escaping quotes to the nth degree

    I'm having big troubles with escaping quotes.
    Here's what I'm trying to do:
    In my Java properties file, there may be a value that contains a URL with quotes. In this case it's a JavaScript function that opens a URL in a new window. Within those quotes, the actual URL should be inserted, for instance:
    # Open the story in a new window
    link.story = javascript:open_window('{0}', '{1}', 546, 400, false);
    Now, I tried MessageFormat.format, and it works, but it also deletes my quotes, leaving me with something like
    javascript:open_window(http://java.sun.com, myNewWindow, 546, 400, false);
    I then tried escaping all quotes with String.replaceAll, however nothing I do works. If I use
    string.replaceAll("\'", "\\\\'");
    it escapes quotes (I'm trying just about every number of backslashes, too!), resulting in
    javascript:open_window(\'{0}\', \'{1}\', 546, 400, false);
    However, after MessageFormat.format, I get
    javascript:open_window({0}, {1}, 546, 400, false);
    So, the big question is: What exactly do I need to be able to write quotes "naturally" in the properties file and then get what I need, namely
    javascript:open_window('http://java.sun.com', 'myNewWindow', 546, 400, false);
    Any help would be greatly appreciated!
    Regards,
    Eric

    Try to double all your single quotes. I had a similar problem and if I correctly remember this was the solution.
    # Open the story in a new window
    link.story = javascript:open_window(''{0}'', ''{1}'', 546, 400, false);
    Hope this helps,
    Pierre
    PS: Note that in the example above I use two single quotes (''), not a double-quote (").

  • Regexes: escape quotes

    Hello Forum...
    I want to use a Pattern/Matcher to find single or double quotes in a string and replace them with escaped quotes e.g. " becomes \" (that I can store in a db). I'm especially confused about the Pattern.compile string - what format will return any quote in a given string ("^*\"\'*")?
    Any advice appreciated - thanks
    /j-p.

    My, that's certainly confusing. Many thanks for the
    patient explanation though I think I'll need some
    practice for it to sink in.
    regards
    /j-p.In plain language, the String literal is being parsed twice. Once, by the compiler which, replaces \\ with \ and \" then again by the regex engine which replaces \\ with \.
    To be honest, I didn't think this out before hand. I just played around with it until I got what it to work and then when you asked, I analzyzed it. Often for things like this, it's a lot faster to do it that way. Start with what you think it should be and then tweak it until it works. Then, if you need to, figure out why your assumption was incorrect and you just taught yourself something.

  • Selection String Empty when Refresh Report

    I'm using CR2008 in VS 2008 (WinForms not Web). This seems like a fairly easy thing to do (was in VB6/CR8.5).
    My program provides a list of reports via the FileDialog, grabs the report name, loads the report document with the report, then the viewer displays the report. Everything works great to that point, but then the user refreshes the report and the selection string is changed to "" (empty) and all records from the table are displayed. Is there something that I'm missing here?
    I have tried both 8.5 and CR2008 reports with the same results. The login seems to be working fine.
    Any help would be appreciated,
    Thanks
    RA Smith
    Puzzled
    Code:
    Private Sub OpenCrystalReportDirectoryToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenCrystalReportDirectoryToolStripMenuItem.Click
    If FileIO.FileSystem.DirectoryExists(dirPath) = False Then
    MsgBox("Crystal Reports Directory not valid. " & _
    "Check that drive is mapped to S: drive.", MsgBoxStyle.Exclamation)
    Else
    Me.OpenFileDialog1.InitialDirectory = dirPath
    If OpenFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
    Try
    rptName = OpenFileDialog1.FileName
    If FileIO.FileSystem.DirectoryExists(rptName) = True Then
    MsgBox("File not found", MsgBoxStyle.Exclamation)
    Else
    Me.reportDocument1.Load(rptName, OpenReportMethod.OpenReportByTempCopy)
    Me.CrystalReportViewer1.ReportSource = Me.reportDocument1
    End If
    Catch Ex As Exception
    MessageBox.Show("Cannot read file from disk. Original error: " & Ex.Message)
    End Try
    End If
    End If
    End Sub

    Ludek,
    This application does nothing but allow the user to select a report from a shared folder on our company server and display.  The report comes in with the correct selection string but with "old" data.  When the refresh button is pressed from the CR Viewer the selection changes to an empty string, therefore, displaying all records in the database table. 
    The report that I'm currently trying to display has no parameter fields. The selection string in the report is:
           {table.amt} > 0.00 and {table.paid} <> "y"
    So do I need to save this selection string and set it each time the user presses REFRESH?  What happens when I move to a report that has parameters?
    I'm still reading microsoft help for VS2008/CR2008 but haven't found anything yet.  Not to say that I didn't miss a step here or there.  The only other thing that I noticed was a setting on the reportDocument called ReportAppServer which was set to <EMBEDDED_REPORT_ENGINE>.  I have been trying to locate information on this setting but there are no other options on the properties screen.  Could this be part of my problem?  I pulled the reportDocument from the toolbox onto the windows form.
    I did not have a problem with this in the old VB6/CR8.5 viewer that I'll be replacing over the next few months as I move from VB6/CR8.5 to VS2008/CR2008.
    Thanks,
    RA Smith

  • Select-string and eliminate the file name of searched file

    Is there a way with the select-string command to exclude the file name of the file you are searching and still get the line items that match your results? 
    Similar to the DOS find command results.  I am trying to become completely independent of a DOS window and still have to find to reduce log files and make them easy to read.
    Thanks
    Chris
    Chris J.

    Sure.  Select-String returns MatchInfo objects, and the string value of the matched line is in the Line property of the objects.
    Select-String -Pattern 'text to match' -Path 'filename.ext' |
    Select -ExpandProperty Line
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • STARTED IT, BUT STILL NEED HELP -- INPUTTTING CHARACTERS FROM LOADED FILE INTO TABLE, SELECTING STRINGS FROM TABLE AND PLACING IN NEW TABLE, SAVING NEW TABLE TO SPREADSHEET FILE

    I AM TRYING TO IMPORT CHARACTERS FROM A TAB DELIMITED FILE INTO A TABLE ON LABVIEW.  ONCE THE DATA IS IN THE TABLE I WANT TO BE ABLE TO SELECT INDIVIDUAL STRINGS FROM THE TABLE AND PLACE IT IN A NEW TABLE.  WHEN I CLICK ON A STRING I WOULD LIKE THE SELECTED STRING TO SHOW IN A TEXT BOX LABELED 'SELECTED STEP'  AFTER ALL THE SELECTED STRINGS IS IN THE TABLE I WOULD LIKE TO SAVE THE NEW TABLE AS ANOTHER SPREADSHEET -- TAB DELIMITED -- FILE, MAKING IT ACCESSIBLE TO OPEN.  HERE IS WHAT I HAVE SO FAR.  I CAN INPUT DATA INTO THE TABLE, BUT I CAN ONLY TRANSFER ONE STRING INTO THE TABLE I WOULD LIKE TO BE TO INPUT MULTIPLE STRINGS.    ALSO WHENEVER I TRY SAVING THE FILE, IT ALWAYS SAVES A UNKNOWN FILE, HOW CAN I GET IT TO SAVE AS A SPREADSHEET FILE.  THANKING ALL OF YOU IN ADVANCE FOR YOUR HELP!!!!!!
    Attachments:
    Selector.zip ‏30 KB

    Pondered,
       The question you are asking is the same one that you asked in: http://forums.ni.com/ni/board/message?board.id=170&message.id=132508#M132508, to which I supplied a revised version of the original vi you used (which was modified from the original one I supplied to an earlier thread). A couple of questions: 1) What does my latest not do that is in your question, 2) Why are you starting yet another thread about the same problem?  We are here trying to help, it makes it a lot easier if you keep the same problem in the same thread, it reduces duplication of effort from those that might not have been following the previous thread(s).  Those of us that don't have our "names in blue" are just doing this "for fun" (the blue names are NI employees, who may still be doing it "for fun"), and it makes it more fun if it doesn't seem (correctly or not) that our attempts are ignored.  If an answer doesn't help, or seems incomplete, post a little more detail to the same thread so that the original respondent, or someone new, can provide more information, or understand your problem better.
    P.M.
    Message Edited by LV_Pro on 07-20-2005 01:20 PM
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Select-String to search only first column in .CSV

    Hello all,
    I'm wondering if anyone knows a way to only search the first column of a .CSV file using Select-String. I guess I could probably import-csv and pipe the first column to select-string, but I was wondering if Select-string has this capability within itself?

    Yes, a "large file that I only need a few lines from" is more the issue. And I was also just curious if Select-String had such functionality. For the file I am reading, it has over 23,000 lines (13MB), and there is a significant
    performance increase with using select-string (over %4000 increase) :
    Using Import-CSV and Where-Object: around 5.938 seconds
    Using Select-String: around 0.138 seconds
    Thus, if I have several strings that I want to search the file for, I would prefer to use Select-String. I suppose I could just do the following?
    1. Use Select-string to search the file for each string I need to search for
    2. Once I'm done searching for all strings, I can query the resultant data set to be sure the string is in the first column of each record in the dataset
    3. If the string is not in the first column in the resultant data set, I can just remove the record.
    Am I way off base here?

  • Alternative to find unique records with 60 character in selection string.

    Hi,
    We have to find out the values from the Infoobject. When we try to display data from an master object, the maximum length of selection it accepts 45 characters only but we need to input data around 60 characters in selection.
    Thing we tried:
    1. Selecting complete data without any condition but it did not work due to large volume of data.
    2. We tried to extract data from RSA3 but it did not work due to large volume of data.
    Please suggest me alternative to find unique records with 60 character in selection string.
    Regards,
    Himanshu Panchal.

    This sounds a bit strange. Are you perhaps mistakenly storing text data incorrectly as the primary key of the master data? I can't think of any actual data that is that length to ensure usinqueness - even GUIDs are maximum 32 characters - but GUIDs don't count as actual "readable" data although you do need to be able to select it from time to time. Perhaps you have a super secure password hash or something like it ?
    Also are you expecting to have a unique single record returned by your selection? To do this would in general REQUIRE that ALL the data is read because master data is not stored in the DB sorted by the data itself, but stored instead sorted by the it's SID.
    When you say you are selecting data from master data, which master data tables are you using? I have been able to select data from very large MD table (15 million unique records) using SE16 with no problems. Just enter the table name, and before you execute just count the number of records - it helps to know what you want to end up with.
    Have you tried using wild cards (the *) to preselect a smaller number of records : * a bit of your 60 character string *
    If you are trying to select from a non-key field you will encounter performance issues, but you can still use the wildcards, and get a result.
    Don't use RSA3 it was designed to make selections and group them into datapackets. It's not the same as selecting directly on the table in SE11 or SE16

  • Strange problem with select-string

    Hello
    i wonder why the first command delivers desired output but the second doesn't. is there any technical explanation for this issue?
    1st command:
    PS C:\>IPConfig | Select-String -Pattern 'IPV4'
    output:  IPv4 Address. . . . . . . . . . . : 10.1.1.1
    2nd set of commands:
    # none of the following commands generates output !!!!
    (Get-WmiObject Win32_OperatingSystem) | Select-String -Pattern 'version'
    #or
    Get-WmiObject Win32_OperatingSystem | Select-String -Pattern 'version'
    #or
    [string]$var = Get-WmiObject win32_operatingSystem
    $var | Select-String -Pattern 'version'
    #or
    [Array]$var = Get-WmiObject win32_operatingSystem
    $var | Select-String -Pattern 'version'
    what can be the reason?
    ( i do know that there are lots of workarounds to achieve that, for example redirecting Get-WmiObject win32_operatingSystem to a text file & the Get-content that text file piped into select string. but i need to know the reason about above examples since
    the mechanism is the same !)
    thanks in advanced

    Hi,
    You have an object, not a string.H
    (Get-WmiObject Win32_OperatingSystem).Version should give you what you're looking for.
    Some examples:
    PS C:\> $ipconfig = ipconfig
    PS C:\> $ipconfig.GetType()
    IsPublic IsSerial Name BaseType
    True True Object[] System.Array
    PS C:\> $ipconfig[0].GetType()
    IsPublic IsSerial Name BaseType
    True True String System.Object
    PS C:\> $os = Get-WmiObject Win32_OperatingSystem
    PS C:\> $os.GetType()
    IsPublic IsSerial Name BaseType
    True True ManagementObject System.Management.ManagementBaseObject
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)
    Hi Mike, thanks a lot for Great explanation.
    so i tried to convert the result of Get-WmiObject Win32_OperatingSystem as string or Array. but still no effect:
    $a = Get-WmiObject Win32_OperatingSystem
    $a.GetType() | ft name,fullname -AutoSize
    <# result is :
    # Name FullName
    ManagementObject System.Management.ManagementObject
    #>
    $b = $a.ToString()
    $b.GetType()
    # output IsPublic IsSerial Name BaseType
    #True True String System.Object
    $b | Select-String -Pattern 'version'
    # no result
    Select-String -Pattern 'version' -InputObject $b
    # result is: \\WIN8-NOTEBOOK\root\cimv2:Win32_OperatingSystem=@
    # now trying to make output be Array:
    $c = @(Get-WmiObject Win32_OperatingSystem)
    $c | Select-String -Pattern 'version'
    # no result
    Select-String -Pattern 'version' -InputObject $c
    # no result
    any more help ?

Maybe you are looking for

  • Urgent editing crisis! Audio track A1 on the timeline has locked itself (not the 'lock symbol').

    I can move the video footage but the audio is stuck. I get the red plus/minus (audio out of sync) when I move the video footage. I can't even right click on any of the files in the Audio 1 track, they are completely 'locked'. If I right click on the

  • Table transformation

    Hi experts, I stay before one problem. In our production database we have table structures witch are fast for OLTP transaction but our analytics need diffrent structures. We dont need DWH. It's bigger than we need. So i decided to create new schema (

  • Ejb-ref element references to other beans

    Hello, Can anyone tell me what ejb references to other beans are for? (ejb-ref element). I am completely missing the point and would be grateful if someone could tell me why I should have the overhead of writing this: <ejb-ref> <ejb-ref-name>ejb/waUs

  • ORA-28536 & ORA-28508 & global_names

    Hi all, I set global_names to TRUE. I am working on db_link between Oracle and MS sql server. The init file: HS_FDS_CONNECT_INFO=MyHost,1433/master HS_FDS_TRACE_LEVEL=debug HS_FDS_RECOVERY_ACCOUNT=RECOVER HS_FDS_RECOVERY_PWD=RECOVER HS_DB_DOMAIN=MyDo

  • How to uninstall 10, 11 & 12?!!!

    Dell T7500 PC Windows 7 Ultimate 64 bit. Have Photoshop Elements 13. How to uninstall 10, 11 & 12?!!! I have used Control>Programs>Unistall get message "This action is only valid for products that are currently installed" & 2.59 GB remains for each v