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

Similar Messages

  • 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 store double quote into a string?

    How to store double quote into a string?
    What I mean is:
    suppose I want to save the following sentence into string s:
    What is the syntax?
    Thanks a lot!

    String s = "<a href=\"../jsp/Logout.jsp\">"
    check out this page
    http://java.sun.com/docs/books/tutorial/index.html
    Hope this helps

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

  • How to replace single quote with double quote

    hai all,
    i have a problem,
    i am trying insert a string containing single quote into ms-access database.
    it is giving error.
    how can i avoid this .if i replace a single quote in the text with double quote it will defenitely
    insert into database.
    in java.lang.String
    replace () will not work to replace quote with double quote.
    any otherway to solve this problem.
    please mail me to [email protected]
    thank you
    sambareddy
    inida

    java.lang.String.replace () will not work to replace quote with double quote.Really?
    String x = ...
    x.replace( "'", "\"" );

  • Single and double quotes entered in form field cause corruption?

    I am creating a database change request system using in APEX 2.2 and the main form has a description field (clob) and a API_description field (varchar2(4000)) that are text area fields on the page. The form seems to have trouble when the string data entered into the text area page items on the form contain single and double quotes.
    <br><br>
    I have pasted my test data below in this problem description(this is not true sql but it gets the point accross). I use the wizard created insert process to get the data into the db from the text fields in the wizard generated form, then use the wizard created fetch process to get the data back out and rendered on the same form. When I use the test data below, sometimes a few characters dissappear from my input data on the way out, sometime form fields go away, and their html is interspersed with the previous form field's data on the page. And I get different results on different tests with the same data.
    <br><br>
    Do I have to do something special for a vanilla htmldb text page item on a form to be able to receive single and double quotes in the string input in order to avoid that string data confusing the processing on the way in to the Database or on the way out for rendering?
    <br><br>
    Do I have to escape the characters? How do I do this?
    <br><br>
    The "varchar2(1) := ‘A’" part of the below TEST DATA string seem to cause the most trouble. The behavior is erratic - sometimes the pattern works, sometimes html is interspersed in one place, sometimes another (on the way back out)
    <br><br>
    START TEST DATA:
    Add column pcl3_data_ind varchar2(1) to edc_tran,edc_log, edc_recreate_tran table
    Or
    Create a file with following sql in it
    Insert into sometable values(‘A’,sysdate);
    Or
    create new table as follows
    create table “someschema”.“sometable”
    (id number not null,
    Name varchar2(20) not null,
    Join_date sysdate
    Active varchar2(1) := ‘A’
    END TEST DATA:
    <br><br>
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Here is an example of the test data being displayed after being fetched back out of oracle (this will look like gibberish when rendered in the forum system (end of problem description except for example):
    <br><br>
    env
    Add column pcl3_data_ind varchar2(1) to edc_tran,edc_log, edc_recreate_tran table
    Or
    Create a file with following sql in it
    Insert into sometable values(‘A’,sysdate);
    Or
    crete new tableas follws
    crate table “somesca”.“sometable”
    har2(20) not null,
    Join_date sysdate
    Active varchar2(1) := ‘A’
    woextarea>
    <a class="eLink" title="Edit" href="javascript:popupURL('f?p=4000:371:204538675714370::::P371_ID,FB_FLOW_ID,FB_FLOW_PAGE_ID:1034609472735510,104,2');" tabindex="999"><img src="/i/e.gif" alt="Edit" class="eLink" /></a></td></tr><tr><td nowrap align="right"><label ...

    I found a good php related post that has a nice set of the potentially problematic characters (this is in the context of word pasted into IE I think). I am pretty confident that at least single curly quotes do not work well in apex 2.2). I would not be surprised if some of the others were trouble as well.:
    http://lists.evolt.org/archive/Week-of-Mon-20030602/141975.html
    here is the list
    $trans_tbl[chr(34)] = '"' ;          //      quote
              $trans_tbl[chr(38)] = '&' ;          //      ampersand
              $trans_tbl[chr(60)] = '<' ;          //      less-than
              $trans_tbl[chr(62)] = '>' ;          //      more-than
              $trans_tbl[chr(128)] = '€' ;     //      euro
              $trans_tbl[chr(129)] = '€' ;      //     euro
              $trans_tbl[chr(130)] = '‚' ;      //     low quote
              $trans_tbl[chr(131)] = 'ƒ' ;      //     florin
              $trans_tbl[chr(132)] = '„' ;      //      double low quote
              $trans_tbl[chr(133)] = '…' ;      //     ellipsis
              $trans_tbl[chr(134)] = '†' ;     //     dagger
              $trans_tbl[chr(135)] = '‡' ;      //     double dagger
              $trans_tbl[chr(136)] = 'ˆ' ;      //     circumflex
              $trans_tbl[chr(137)] = '‰' ;      //     per thousand
              $trans_tbl[chr(138)] = 'Š' ;      //     S caron
              $trans_tbl[chr(139)] = '‹' ;      //     left angle quote
              $trans_tbl[chr(140)] = 'Œ' ;      //     OE ligature
              $trans_tbl[chr(142)] = 'Ž' ;      //     Z caron
              $trans_tbl[chr(145)] = '‘' ;      //     left single quote
              $trans_tbl[chr(146)] = '’' ;      //     right single quote
              $trans_tbl[chr(147)] = '“' ;      //     left double quote
              $trans_tbl[chr(148)] = '”' ;      //     right double quote
              $trans_tbl[chr(149)] = '•' ;      //     bullet
              $trans_tbl[chr(150)] = '–' ;      //     en dash
              $trans_tbl[chr(151)] = '—' ;      //     em dash
              $trans_tbl[chr(152)] = '˜' ;      //     small tilde
              $trans_tbl[chr(153)] = '™' ;      //     trademark
              $trans_tbl[chr(154)] = 'š' ;      //     small s caron
              $trans_tbl[chr(155)] = '›' ;      //     right angle quote
              $trans_tbl[chr(156)] = 'œ' ;      //     oe ligature
              $trans_tbl[chr(158)] = 'ž' ;      //      small z caron
              $trans_tbl[chr(159)] = 'Ÿ' ;      //     Y with diaeresis
    <br>
    -Geoffrey

  • Can't import csv fields starting with double quotes but lack ending ones

    Hi all,
    When I'm trying to used external table to import a csv file, specified as using comma as delimiter optionally enclosed by double quotes, some records are rejected because a field in the record has starting double quotes, but without ending ones.
    Assume the customer really want these starting double quotes, how do I change my external table specification such that these starting double quotes are treated as part of the field data and can be successfully inserted into db?
    Many thanks.

    I have no access to Oracle during weekends, so nothing can be tested. So here it goes:
    Suggestion: DELIMITED BY '","' and of course omitt ENCLOSED BY '"'
    You will have to update each row of the rows just loaded setting the first_field to substr(first_field,2) and the last_field to substr(last_field,-2)
    If all the fields are not enclosed in double quotes (TRUE for strings and FALSE for numbers and dates) the situation (syntax diagrams allow two delimiters only) is somehow more complicated, anyway you can specify DELIMITED BY ',' and update all varchar2 fields in each row of the rows just loaded setting the varchar2_field to substr(varchar2_field,2,length(varchar2_field) - 2).
    Regards
    Etbin
    After posting I noticed it's difficult to distinguish between single and double quotes:
    the first DELIMITED BY should read {single quote){double quote}{comma}{double quote}{single quote)
    the ENCLOSED BY should read {single quote){double quote}{single quote)
    Message was edited by: Etbin
    user596003

  • How to replace one double quotes with two double quotes in XSLT

    How can I replace one double quote to a two double quote in a string in XSLT
    I am passing the parameter string to XSLT template contains the value as
    <xsl:variable name="Description">Hi! "How are you</xsl:variable>
    <xsl:variable name="VQuotes">""</xsl:variable>
    I nead the output as
    Hi! ""How are you.
    Tried with Translate function, but it did not work out
    <xsl:element name="DESCRIPTION_SHORT">
              <xsl:value-of select="translate($Description,'&quot;', VQuotes)" />
            </xsl:element>But it is giving the same result as Hi! "How are you
    When I tried with
    <xsl:element name="DESCRIPTION_SHORT">
              <xsl:value-of select="translate($Description,'&quot;', 'BB')" />
            </xsl:element>
    It gave the result as
    Hi! BHow are you.
    It is replacing only one character with one. how to make it for two characters.
    Am I doing anything wrong in syntax?
    Please help.
    Regards, Vignesh S

    Hi Vignesh,
    Try this.
    Its a two step process:
    Step1: Add the following template would be "called" to do the replacement as your want:
    <xsl:template name="string-replace-all">
    <xsl:param name="text" />
    <xsl:param name="replace" />
    <xsl:param name="by" />
    <xsl:choose>
    <xsl:when test="contains($text, $replace)">
    <xsl:value-of select="substring-before($text,$replace)" />
    <xsl:value-of select="$by" />
    <xsl:call-template name="string-replace-all">
    <xsl:with-param name="text"
    select="substring-after($text,$replace)" />
    <xsl:with-param name="replace" select="$replace" />
    <xsl:with-param name="by" select="$by" />
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="$text" />
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    Step2: Call the above templeate in the place where you want to call, like this:
    <!--Define the variables-->
    <xsl:variable name="Description">Hi! "How are you</xsl:variable>
    <xsl:variable name="sQuotes">"</xsl:variable>
    <xsl:variable name="VQuotes">""</xsl:variable>
    <!--Following call the template which you have defined in step1-->
    <xsl:element name="DESCRIPTION_SHORT">
    <xsl:variable name="myVar">
    <xsl:call-template name="string-replace-all">
    <xsl:with-param name="text" select="$Description" />
    <xsl:with-param name="replace" select="$sQuotes" />
    <xsl:with-param name="by" select="$VQuotes" />
    </xsl:call-template>
    </xsl:variable>
    <xsl:value-of select="$myVar" />
    </xsl:element>
    I have tested this and works. And outputs as the following with two-double quote as you want.
    <DESCRIPTION_SHORT>Hi!
    ""How are you</DESCRIPTION_SHORT>
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • SSRS Report Returning Double Quote string from a Single Quote String

    Hi, I'm getting weird thing in resultset from SSRS report when executed. When I pass parameter to a report, which passes String that has single quote value to a split function , it returns rows with double quote. 
    For example  following string:
    'N gage, Wash 'n Curl,Murray's, Don't-B-Bald
    Returns: 
    ''N gage, Wash ''n Curl,Murray''s, Don''t-B-Bald
    through SSRS report.
    Here is the split function Im using in a report.
    CREATE Function [dbo].[fnSplit] (
    @List varchar(8000), 
    @Delimiter char(1)
    Returns @Temp1 Table (
    ItemId int Identity(1, 1) NOT NULL PRIMARY KEY , 
    Item varchar(8000) NULL 
    As 
    Begin 
    Declare @item varchar(4000), 
    @iPos int 
    Set @Delimiter = ISNULL(@Delimiter, ';' ) 
    Set @List = RTrim(LTrim(@List)) 
    -- check for final delimiter 
    If Right( @List, 1 ) <> @Delimiter -- append final delimiter 
    Select @List = @List + @Delimiter -- get position of first element 
    Select @iPos = Charindex( @Delimiter, @List, 1 ) 
    While @iPos > 0 
    Begin 
    -- get item 
    Select @item = LTrim( RTrim( Substring( @List, 1, @iPos -1 ) ) ) 
    If @@ERROR <> 0 Break -- remove item form list 
    Select @List = Substring( @List, @iPos + 1, Len(@List) - @iPos + 1 ) 
    If @@ERROR <> 0 Break -- insert item 
    Insert @Temp1 Values( @item ) If @@ERROR <> 0 Break 
    -- get position pf next item 
    Select @iPos = Charindex( @Delimiter, @List, 1 ) 
    If @@ERROR <> 0 Break 
    End 
    Return 
    End
    FYI: I'm getting @List value from a table and passing it as a string to split function. 
    Any help would be appreciated!
    ZK

    Another user from TSQL forum posted this code which is returning the same resultset but when I execute both codes in SQL server it works and return single quote as expected.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8d5c96f5-c498-4f43-b2fb-284b0e83b205/passing-string-which-has-single-quote-rowvalue-to-a-function-returns-double-quoate?forum=transactsql
    CREATE FUNCTION dbo.splitter(@string VARCHAR(MAX), @delim CHAR(1))
    RETURNS @result TABLE (id INT IDENTITY, value VARCHAR(MAX))
    AS
    BEGIN
    WHILE CHARINDEX(@delim,@string) > 0
    BEGIN
    INSERT INTO @result (value) VALUES (LEFT(@string,CHARINDEX(@delim,@string)-1))
    SET @string = RIGHT(@string,LEN(@string)-CHARINDEX(@delim,@string))
    END
    INSERT INTO @result (value) VALUES (@string)
    RETURN
    END
    GO
    ZK

  • XSD OTD compilefailure String literal not properly closed by double-quote

    Java CAPS 5.1.3
    I have created a XSD to describe a simple XML file. After this I created an OTD from the exported XSD file.
    This OTD is being used in a JCD. During the build of the Deployment Profile I get the error: :Compile failed: xsd.XSD_MB235401907.X_all_B: Line 69: String literal is not properly closed by a double-quote
    All steps have been preferformed within the same eDesigner and the same repository.
    I have verified the XSD file with netbeans and can not see a problem with the file itself.
    Any ideas to resolve this compile failure?
    The XSD is:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:tns="http://ams1saa011:12000/repository/repository/Recieve/MessageBroker/WISE_WTE/repository1423024:117d46f486a:-8000/XSDDefinition1" targetNamespace="http://ams1saa011:12000/repository/repository/Recieve/MessageBroker/WISE_WTE/repository1423024:117d46f486a:-8000/XSDDefinition1">
        <xsd:element name="MessageBroker">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element name="IN" maxOccurs="unbounded">
                        <xsd:complexType>
                            <xsd:all>
                                <xsd:element name="MSGFN" type="xsd:string" default="IN"/>
                                <xsd:element name="DIR" type="xsd:string" default="\"/>
                                <xsd:element name="FILEMASK"
                                    type="xsd:string" default="*.DAT"/>
                                <xsd:element name="MAPID" type="xsd:string" default="MS000"/>
                                <xsd:element name="RCVPRN" type="xsd:string"/>
                                <xsd:element name="RCVPRT" type="xsd:string"/>
                                <xsd:element name="RCVPFC" type="xsd:string"/>
                                <xsd:element name="SNDPRN" type="xsd:string"/>
                                <xsd:element name="SNDPRT" type="xsd:string"/>
                                <xsd:element name="MESTYP" type="xsd:string"/>
                                <xsd:element name="MESCOD" type="xsd:string"/>
                                <xsd:element name="MESFCT" type="xsd:string"/>
                                <xsd:element name="TEST" type="xsd:boolean" nillable="true"/>
                            </xsd:all>
                        </xsd:complexType>
                    </xsd:element>
                </xsd:sequence>
                <xsd:attribute name="dateTime" type="xsd:dateTime"/>
            </xsd:complexType>
        </xsd:element>
    </xsd:schema>The complete error stack trace is:
    com.stc.codegen.framework.model.CodeGenException: error generating otd for CMap1_jcdMB_Recieve_SAP_Inbound1:Compile failed: xsd.XSD_MB235401907.X_all_B: Line 69: String literal is not properly closed by a double-quote
         at com.stc.codegen.OTDImpl.model.OTDCodeletFactory$OTDCodelet.postFileGeneration(OTDCodeletFactory.java:767)
         at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.processCodelets(CodeGenFrameworkImpl.java:653)
         at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.process(CodeGenFrameworkImpl.java:1544)
         at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:405)
         at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:308)
         at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.traverseDeployment(DeploymentVisitorImpl.java:268)
         at com.stc.codegen.driver.module.DeploymentBuildAction.loadCodeGen(DeploymentBuildAction.java:923)
         at com.stc.codegen.driver.module.DeploymentBuildAction.access$1000(DeploymentBuildAction.java:174)
         at com.stc.codegen.driver.module.DeploymentBuildAction$1.run(DeploymentBuildAction.java:599)
         at org.openide.util.Task.run(Task.java:136)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:599)
    Caused by: java.lang.RuntimeException: Compile failed: xsd.XSD_MB235401907.X_all_B: Line 69: String literal is not properly closed by a double-quote
         at com.stc.javac.Javac.compile(Javac.java:227)
         at com.stc.otd.codegen.BaseXsdDtdGenerator.compileFromJarfile(BaseXsdDtdGenerator.java:254)
         at com.stc.otd.codegen.BaseXsdDtdGenerator.compile(BaseXsdDtdGenerator.java:52)
         at com.stc.otd.xsd.codegen.XsdParserGenerator.compile(XsdParserGenerator.java:182)
         at com.stc.otd.codegen.BaseXsdDtdGenerator.generate(BaseXsdDtdGenerator.java:166)
         at com.stc.otd.codegen.BaseXsdDtdGenerator.generate(BaseXsdDtdGenerator.java:90)
         at com.stc.codegen.OTDImpl.model.CollabOTDGenerator.generateCollabOTDJavaFiles(CollabOTDGenerator.java:233)
         at com.stc.codegen.OTDImpl.model.OTDCodeletFactory$OTDCodelet.processOTDJars(OTDCodeletFactory.java:861)
         at com.stc.codegen.OTDImpl.model.OTDCodeletFactory$OTDCodelet.postFileGeneration(OTDCodeletFactory.java:666)
         ... 10 more

    You may need to escape the default slash "\\".
    I'd suggest importing the xsd into the jcaps xml schema editor and verifying that way and then creating the otd by node export.
    Regards,
    Rupert

  • String literal is not properly closed by a double-quote

    Hi,
    In my Java Class, this message appears:
    String literal is not properly closed by a double-quote
    LINE: The red part of the statement.
    Please help! Thanks!
    package demo;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.Persistence;
    public class Flights {
         private EntityManagerFactory emf;
        private EntityManager getEntityManager() {
            if (emf == null) {
                emf = Persistence.createEntityManagerFactory("Flights");
            return emf.createEntityManager();
        public Flights[] getFlights() {
            EntityManager em = getEntityManager();
            try {
                javax.persistence.Query q = em.createQuery("SELECT /*+ INDEX(lh_master_q lh_master_pk)*/ DISTINCT to_char(FD.FLIGHT_DATE, 'DY')||'.'|| FD.FLIGHT_DATE AS DATE_HEADER,
      FD.FLIGHT_DATE AS TRAVEL_DATE,
      B.CITY                       AS LEAVING,
      LM.STD                       AS DEPART,
      C.CITY                       AS ARRIVING,
      LM.STA                       AS ARR,
      LM.FNR                       AS FLIGHT,
      E.CARRIER                    AS AIRLINE,
      LM.ACTYPE                    AS AIRCRAFT,
      LM.ACTYPEFULLNAME            AS EQUIP,
      LM.STD ||' '|| LM.DEP ||' - '|| LM.STA ||' '|| LM.ARR AS SCHEDULE,
      B.CITY ||' - '|| C.CITY AS ROUTE
      MAX(CASE WHEN FA.BOOKING_CLASS = 'S' AND p_num_adt > 1 THEN (ROUND(FA.LH_FARE_EUR, 2)* p_num_adt) END) AS ECONOMY_SAVER,
      MAX(CASE WHEN FA.BOOKING_CLASS = 'H' AND p_num_adt > 1 THEN (ROUND(FA.LH_FARE_EUR, 2)* p_num_adt) END) AS ECONOMY,
      MAX(CASE WHEN FA.BOOKING_CLASS = 'B' AND p_num_adt > 1 THEN (ROUND(FA.LH_FARE_EUR, 2)* p_num_adt) END) AS ECONOMY_FLEXIBLE,
      MAX(CASE WHEN FA.BOOKING_CLASS = 'Z' AND p_num_adt > 1 THEN (ROUND(FA.LH_FARE_EUR, 2)* p_num_adt) END) AS BUSINESS,
      MAX(CASE WHEN FA.BOOKING_CLASS = 'D' AND p_num_adt > 1 THEN (ROUND(FA.LH_FARE_EUR, 2)* p_num_adt) END) AS BUSINESS_FLEXIBLE,
      MAX(CASE WHEN FA.BOOKING_CLASS = 'F' AND p_num_adt > 1 THEN (ROUND(FA.LH_FARE_EUR, 2)* p_num_adt) END) AS FIRST_CLASS
    FROM LH_MASTER_Q LM, LH_FLIGHT_DATE FD, AIRPORTS_LOOKUP B, AIRPORTS_LOOKUP C, CARRIERS E, LH_FARES FA, LH_SERVICE_CLASS SC, LH_CABIN_CLASS CC
    WHERE LM.ROWNR = FD.FLIGHT_LEG_ID
       AND LM.DEP = FA.FROM_AP
       AND LM.ARR = FA.TO_AP
       AND LM.DEP = B.IATA_CODE
       AND LM.ARR = C.IATA_CODE
       AND LM.AL = E.CARRIER_CODE
       AND FA.BOOKING_CLASS = SC.BKG_CLASS_ID
       AND SC.CABIN_CLASS_ID = CC.CABIN_CLASS_ID
       AND LM.ACTYPE = FD.AIRCRAFT_TYPE
       AND B.CITY_CODE = :p_leaving
       AND C.CITY_CODE = :p_arriving
       AND CC.CABIN_CLASS_NAME = :p_class
       AND E.CARRIER = :p_airline
       AND FD.FLIGHT_DATE = :p_outbound
    GROUP BY FD.FLIGHT_DATE,
             to_char(FD.FLIGHT_DATE, 'DY')||'.'|| FD.FLIGHT_DATE,
             B.CITY,
             LM.STD,
             C.CITY,
             LM.STA,
             LM.FNR,
             E.CARRIER,
             LM.ACTYPE,
             LM.ACTYPEFULLNAME,
             LM.STD ||' '|| LM.DEP ||' - '|| LM.STA ||' '|| LM.ARR,
             B.CITY ||' - '|| C.CITY,
             to_char(FD.FLIGHT_DATE, 'DY')
    ORDER BY Depart;");
                return (Flights[]) q.getResultList().toArray(new Flights[0]);
            } finally {
                em.close();
    }

    From the Java specification (http://docs.oracle.com/javase/specs/jls/se5.0/html/lexical.html#3.10.5):
    It is a compile-time error for a line terminator to appear after the opening " and before the closing matching ".
    In other words, string literals cannot span lines.
    You can use the concatenation operator ( + ) to fix this:
    String myLiteral = "A long line " +
    "Another long line " +
    "Another long line, etc.";
    If you're going to ever print out that string literal (like for debugging purposes), it would probably be better to have a return at the end of each line (\n):
    String myLiteral = "A long line\n" +
    "Another long line\n" +
    "Another long line, etc.";
    Edited by: user739461 on Mar 5, 2012 8:10 AM

  • String value changes single quote ' to double quote "

    I am creating a list with different bill codes within single
    quotes as follows
    <cfset corlist = " '1100 ','1200 ','1300 ','1700 ','1800
    ','1950 ','7001 ' ">
    when I do an output
    for
    <cfoutput>AND idbillcode IN ( #corlist
    #)</cfoutput>
    I get the values as follows
    AND idbillcode IN ( '1100 ','1200 ','1300 ','1700 ','1800
    ','1950 ','7001 ')
    However when I put the same string within a cfquery the
    single quotes get replaced by double quotes as follows
    AND idbillcode IN ( ''1100 '',''1200 '',''1300 '',''1700
    '',''1800 '',''1950 '',''7001 '') which throws an error.
    Anybody has any clues.
    Thanks.

    However when I put the same string within a cfquery the
    single quotes
    get replaced by double quotes as follows
    AND idbillcode IN ( ''1100 '',''1200 '',''1300 '',''1700
    '',''1800
    '',''1950
    '',''7001 '') which throws an error.
    Anybody has any clues.
    That is ColdFusion escaping the single quotes, by doubling
    them so that
    you can search for strings such as "singhpk's code does not
    work".
    (Note the single quote/apostrophe that would normally break
    this string
    if it was not escaped.
    To tell CF not to do this, one uses the
    preserveSingleQuotes() function.
    The documentation has all the details.

  • StringTokenizer class problem with strings in double quotes

    Hello Technocrats,
    I have a problem with tokenizing following string enclosed in (). (abc," India, Asia", computer engineer). My separator is ",", thus StringTokenizer class gives me 4 tokens namely abc, "India, Asia" and computer engineer. But I require that String in double quotes should be a single token. How to achieve this using StringTokenizer class? Or is there any other way?
    Thanks in advance.

    Try
    String[] str="abc,\" India, Asia\",computer engineer".split(",",1);
              for(String s: str)
                   System.out.println(s);
              }Thanks.

  • Escaping double quotes and/or semi-colons in connection string

    Can someone show me a working example of a connection string that uses a password that contains a double quote (") and another example that has a password that contains a semi-colon.
    I cannot get this to work and I can't find anything in the documentation.
    Thanks.

    You didn't say what part of the .NET documentation this came from. I tried this with ODP.NET and I was unable to get it to work.
    Did you try it?
    here are the same tests I've been trying. Can someone please provide me with a working example.
              static void Main(string[] args)
                   OracleConnection oc=null;
                   try
                        oc=new OracleConnection("User Id=tmoore2;Password=te\"st;Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        Console.WriteLine("User Id=tmoore2;Password=te\\\"st;Data Source=dev3;");
                        oc=new OracleConnection("User Id=tmoore2;Password=te\\\"st;Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;Password=\"te\\\"st\";Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;Password='te\"st';Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;Password='te\\\"st';Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;\"Password=te\"st\";Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
                   try
                        oc=new OracleConnection("User Id=tmoore2;\"Password=te\\\"st\";Data Source=dev3;");
                        oc.Open();
                        Console.WriteLine("Success");
                   catch(Exception ex)
                        Console.WriteLine(ex.Message);
                   finally
                        if(oc!=null)
                             oc.Close();
                             oc.Dispose();
              }

  • Embedded double quotes in a quoted string not working.

    It seems that Numbers doesn't process embedded double quotes correctly in a quoted string. Is this an issue that Apple are aware about? Any fixes planned? Is this an issue that Apple are aware about? Any fixes planned?
    This is not an issue in Excel, but I'd prefer to use Numbers.

    To run Hiroto's script, copy and paste into AppleScript Editor.  Click the compile "hammer" to make sure the copy/paste went well.  Then (still in AppleScript Editor click the run button.  Then, back in Numbers, click once in a cell in an existing table, and paste.
    To run the service in the post immediately above Hiroto's, just click the link in my post and doubleclick the downloaded .workflow package. (You may have to go to System Preferences > Privacy & Security and click "Download Anyway").  It then appears automatically in your Numbers > Services menu.  Then to run the script just choose the item in the menu item CSV to Tabs on Clipboard.
    You can uninstall the Service at any time by holding down the option key while in Finder and from the menu Go > Library > Services.
    If you have a chance to try these, would be interested in hearing back whether they worked for you. They are working well on my setup here.
    SG

Maybe you are looking for

  • Bootcamp assistant no longer showing up in windows 7

    Bootcamp with windows 7 has worked fine for me for months and months and suddenly the small grey diamond that stayed in the taskbar has dissapeared and the only way I can bring it back is continously reinstalling the bootcamp drivers on the windows s

  • How do i get just the icons to appear in my yahoo tool bar without the labels?

    how do i get the tool bars to just show the icons and not the labels or the short description of the icon. it makes a few of the icons hidden and i then need to scroll down to open them.

  • ITunes DJ same songs twice in following

    It has to be a known problem and there has to be a simple solution: How can I prevent iTunes DJ from playing a second time the same song right after the first time? There has to be a way to prevent the same Song being played twice a day! Please someb

  • Missing-anchor-value Error using PowerShell MA (Soren Granfeldt)

    Hi Everyone, I'm triying  to do a simple sinchronization using PowerShel MA (Soren Granfeld) v5.0. I've already configured the MA, but when I do a Full Import the Sync Engine sent me: missing-anchor-value. I configured the anchor attribute based on t

  • How to integrate Data Services with Netweaver CE CAF

    Hi, I am trying to read and write data from Data Services into CAF. How can this be possible ? Is there any other way than using web services ? Thanks in advance for your help. Thibault Schalck