The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

<!--  Presentation generated by Internet Assistant for Microsoft PowerPoint 97 -->

<HTML>
<HEAD>

<meta name="GENERATOR" content="Microsoft Internet Assistant for Microsoft PowerPoint 97">
 <TITLE>SQL Portability - SQL Dialects</TITLE> 
</HEAD>

<BODY     >

<CENTER>
<TABLE WIDTH=100%> 
     <TR> <TD WIDTH=100% ALIGN=CENTER>
         <A HREF="sld001.htm">First</A>&nbsp;&nbsp;
         <A HREF="sld082.htm">Previous</A>&nbsp;&nbsp;
         <A HREF="sld084.htm">Next</A>&nbsp;&nbsp;
         <A HREF="sld102.htm">Last</A>&nbsp;&nbsp;
&nbsp;&nbsp;         <A HREF="index.htm">Index</A>&nbsp;&nbsp;
         <A HREF="dbi.perl.org">Home</A>&nbsp;&nbsp;
         <A HREF="tsld083.htm">Text</A>&nbsp;&nbsp;
     </TD> </TR>
     <TR> <TD WIDTH=100% ALIGN=CENTER>
         <IMG SRC="img083.gif" usemap="#Objmap" WIDTH=800 HEIGHT=600 BORDER=0>
     </TD> </TR>
</TABLE>
<P>Slide 83 of 102</P>
</CENTER>
<!-- <UL>
<H2>SQL Portability - SQL Dialects</H2>
</UL></P>
<P><UL>
<LI><H2>How to concatenate strings? Let me count the (incompatible) ways...
</H2>
<UL>
SELECT first_name || ' ' || last_name FROM table
<BR><BR>SELECT first_name + ' ' + last_name FROM table
<BR>SELECT first_name CONCAT ' ' CONCAT last_name FROM table
<BR>SELECT CONCAT(first_name, ' ', last_name) FROM table
<BR>SELECT CONCAT(first_name, CONCAT(' ', last_name)) FROM table
</UL></UL><UL>
<LI><H2>
</H2>
</UL><UL>
<LI><H2>The ODBC way:     (not pretty, but portable)
</H2>
<UL>
SELECT {fn CONCAT(first_name, {fn CONCAT(' ', last_name))}} FROM table
<BR></UL></UL><UL>
<H2>
</H2>
</UL><UL>
<LI><H2>The {fn …} will be rewritten by prepare() to the required syntax via a call to
</H2>
<UL>
$new_sql_fragment = $dbh-&#062{Rewrite}-&#062CONCAT(”…”)
<BR></UL></UL><UL>
<LI><H2>
</H2>
</UL><UL>
<LI><H2>Similarly for some data types:
</H2>
<UL>
SELECT * FROM table WHERE date_time &#062 {ts ’2002-06-04 12:00:00’ } FROM table
<BR><BR>$new_sql_fragment = $dbh-&#062{Rewrite}-&#062ts(’2002-06-04 12:00:00’)
</UL></UL><UL>
<LI><H2>
</H2>
</UL><UL>
<LI><H2>This 'rewrite' functionality is planned but not yet implemented</H2>
</UL></P>
<P>  -->
</Body>
</HTML>