develooper Front page | perl.dbi.users | Postings from February 2019

RE: Translate between DBI and SQL

Thread Previous | Thread Next
From:
Fennell, Brian
Date:
February 11, 2019 16:13
Subject:
RE: Translate between DBI and SQL
Message ID:
BN6PR14MB161703ED3BE1E43DA8F07647A2640@BN6PR14MB1617.namprd14.prod.outlook.com
Mike,
If you have a complete example of what you are starting with and what you want to end up with your question would be clearer.
If I understand you correctly:
You start with raw SQL such as you might enter into a Postgres command line tool (for example psql).
What you want is the equivalent Perl source code to define the identical SQL as a string literal.

Please look at the docs here:

https://metacpan.org/pod/perlop
https://metacpan.org/pod/perlop#Quote-and-Quote-like-Operators
https://metacpan.org/pod/perlop#Gory-details-of-parsing-quoted-constructs
https://metacpan.org/pod/perlop#Additive-Operators        (Especially the “.” Operator)
https://metacpan.org/pod/perlop#Assignment-Operators        (Especially the “.=” Assignment Operator)
https://metacpan.org/pod/perlfunc#ord-EXPR
https://metacpan.org/pod/perlfunc#chr-NUMBER

And see if that helps.






The information contained in this electronic mail transmission is intended only for the use of the individual or entity named in this transmission. If you are not the intended recipient of this transmission, you are hereby notified that any disclosure, copying or distribution of the contents of this transmission is strictly prohibited and that you should delete the contents of this transmission from your system immediately. Any comments or statements contained in this transmission do not necessarily reflect the views or position of Radial or its subsidiaries and/or affiliates.



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About