Month: November 2008

<CTRL> + .

Sometimes the simplest tricks just ease your life the nice way. While typing code in TOAD, I just found out those two handy keyboard shortcuts <CTRL> + . = Autocompletes tablenames <CTRL> + T = Popups the list of column names I want to select everything from emp and dept joined on deptno. SELECT*FROM E […]

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>’); DEPTNO DNAME LOC 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON