The "Wrong" bit is debatable

No, it's just wrong, regarding the quotes. I totally lost the thread context when replying to Re^3: SQL Query error while executing in perl. Is it possible to execute these Scripts??. All that I wanted to comment was the possible SQL injection ...

my $sql = "DECLARE \@log varchar(5) SET \@log=$tim Update dbo.tltime s +et logtime = \@log"; # ... here --^

... combined with the words "so , use double-quotes", this lead to ...

my $sql = "DECLARE \@log varchar(5) SET \@log=\"$tim\" Update dbo.tlti +me set logtime = \@log"; # ^^ ^^

... in my mind. Which is even worse than what was posted. This lead to my "Wrong." posting. Still, at least MySQL allows values in double quotes, unless ANSI QUOTES are enabled.

Regarding problems with quoted identifiers, you are right. Quoting identifiers can cause more problems than it is worth.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^6: SQL Query error while executing in perl. Is it possible to execute these Scripts?? by afoken
in thread SQL Query error while executing in perl. Is it possible to execute these Scripts?? by Sachin_dada

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.