Daily Archives Friday, November 2008

Exadata Related Posts. Losing Posts in the Mosh Pit.

I’ve had several people ask me questions recently about topics I’ve covered in at least a few of my Exadata Storage Server related posts. When I asked them if they’d seen a particular post, they’ve generally responded, “No, I didn’t know that post existed”, or words to that effect. So, this may seem odd, but [...]

Oracle EBooks

LewisC’s An Expert’s Guide to Oracle Technology
I’ve decided that my next writing task (besides the blog here), will be a series of ebooks. I am thinking that I will start with Intro To SQL, Intro to Relational Databases, Modern Replication Tools, R…

Speaking in Stockholm

It’s a great honor for me to be invited to speak in Sweden in December 10-11 !
More details on orcan.se ==> agenda
I am optimistic in getting a few copies of my book to give away

addthis_url = ‘http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F11%2Fspeaking-in-stockholm.html’;
addthis_title = ‘Speaking+in+Stockholm’;
addthis_pub = [...]

select in HTML format, XQUERY variant

Same as Select in html format, but with XMLTABLE instead of XMLTRANSFORM

select
  xmlroot(
    xmlelement(
      "table",
      xmlconcat(
        xmltype(
'<tr><th>DEPTNO</th><th>DNAME</th><th>LOC</th></tr>'),
        xmlagg(column_value)
      )
    ),version '1.0'
  )
from
  xmltable('
    for $f in ora:view("LSC_DEPT")
    return
      <tr>
        <td>{$f/ROW/DEPTNO/text()}</td>
        <td>{$f/ROW/DNAME/text()}</td>
        <td>{$f/ROW/LOC/text()}</td>
      </tr>');

XMLROOT(XMLELEMENT("TABLE",XMLCONCAT(XMLTYPE('<TR>
————————————————–
<?xml version="1.0"?>                            
<table>                                          
  <tr>                                            
    <th>DEPTNO</th>                              
    <th>DNAME</th>                                
    <th>LOC</th>                                  
  </tr>                                          
  <tr>                                            
    <td>10</td>                                  
    <td>ACCOUNTING</td>                          
    <td>NEW YORK</td>                            
  </tr>                                          
  <tr>                                            
    <td>20</td>                                  
    <td>RESEARCH</td>                            
    <td>DALLAS</td>                              
  </tr>                                          
  <tr>                                            
    <td>30</td>                                  
    <td>SALES</td>                                
    <td>CHICAGO</td>                              
  </tr>                                          
  <tr>                                            
    <td>40</td>                                  
    <td>OPERATIONS</td>                          
    <td>BOSTON</td>                              
  </tr>                                          
</table>                                          

addthis_url = ‘http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F11%2Fselect-in-html-format-xquery-variant.html’;
addthis_title = ’select+in+HTML+format%2C+XQUERY+variant’;
[...]

select in HTML format

Last Wednesday I selected data from an HTML table : select from xml
Today, let’s try the opposite, generate an HTML table from a SQL query

select
  XMLSERIALIZE(
    DOCUMENT
    XMLROOT(
      XMLTRANSFORM(
        XMLTYPE(
          CURSOR(
           SELECT * FROM DEPT
          )
        ),
        XMLTYPE.CREATEXML(
      '<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:template match="/">
  <html>
    <head>
      <title>Table DEPT</title>
    </head>
    <body>
    <p>Table DEPT in HTML format</p>
    <table border="1">
      <tr>
        <th align="right">DEPTNO</th>
        <th align="left">DNAME</th>
        <th align="left">LOC</th>
      </tr>
<xsl:for-each select="/ROWSET/ROW">
      <tr>
        <td align="right"><xsl:value-of select="DEPTNO"/></td>
        <td align="left"><xsl:value-of select="DNAME"/></td>
        <td align="left"><xsl:value-of select="LOC"/></td>
      </tr>
</xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>'
        )
      )
    , VERSION '1.0')
  )
from DUAL;

Table DEPT [...]

Data Breach: Express Scripts Pharmacy

LewisC’s An Expert’s Guide To Oracle Technology
Once more unto the breach, dear freinds, once more.
Express Scripts Warns of Potential Large Data Breach Tied to Threat
I used Express Scripts on at least one prior job so this kind of sucks for me as …