in reply to eliminating double quote

Please use code tags to surround code and data.

Do the double quotes appear as a return within the code or direct SQL return or both? It's a bit difficult to tell with your question.

-stevieb

Replies are listed 'Best First'.
Re^2: eliminating double quote
by pragov (Novice) on Nov 25, 2014 at 20:19 UTC

    Hi All, I use this in CGI

    </code> $PTName =~ s/,/','/g; if ($PTName) { $Where = $Where . "AND E.PT_name IN ANY ($PTName) "; } </code>

    to select multi names pairs from a list box isc01cfa,isc02cfa isc03ifa,isc04ifa But the teradata SQL output it gives ..........AND E.PT_name IN ANY ('isc01cfa','isc02cfa'',''isc03ifa','isc04ifa') It puts the double quote after the pair and before next pair.

    How to modify the CGI? Thanks, Pragov

      I'm guessing your double quotes are 2 single quotes, in which case this might work
      #!perl use strict; my $PTName = "'isc01cfa,isc02cfa','isc03ifa,isc04ifa'"; $PTName =~ s/','/,/g; # add $PTName =~ s/,/','/g; print $PTName;
      poj
        Thanks for the solution! It worked for my scenario perfectly. Pragov
      Your code tag is still wrong, because you have a / in the opening tag, which should be <code> and not </code> as you currently have it. Changing it should make your code formatting clearer.

      And please, maybe you could rephrase the question, for the time being, I fail to understand the real nature of your problem.

        pragov: Also, please correct the OP rather than your second post — and certainly do not post yet another copy of the OP!