Run a PL/SQL block in the SQL editor as follows:<br />declare<br />begin<br /> OPEN :pv_cur FOR 'select * from dual';<br />end;<br /><br />Or if you have a function returning a refcursor<br /><br />declare<br />BEGIN<br /> :pv_cur := function_name(param1,param_etc);<br />END;<br /><br />TOAD will prompt you for the datatype/value of ':pv_cur'. <br />Change the type to 'Cursor' and leave the value blank, hit OK. <br />The ref cursor will be displayed in the standard data grid below, as if you had run a query.<br /><br /><br /> |
Tuesday, 25 November 2008
Viewing a Refcursor in TOAD
Posted by Ook at 03:59 0 comments
Tuesday, 18 November 2008
New database for crowd
Tough to find this one as its not in the install directories /var/opt/atlassian-crowd-home/crowd.cfg.xml See also http://confluence.atlassian.com/display/CROWD/Important+Directories+and+Files |
Posted by Ook at 08:26 0 comments
Tuesday, 11 November 2008
Oracle: Checking a column is numeric
select * from table1 where ltrim(rtrim(translate(col1,'0123456789-.',' '))) is not null |
Posted by Ook at 02:38 0 comments
Labels: Oracle
Wednesday, 5 November 2008
Perl one-liner to summarise file volumes by hour
ls -l /u02/volestlivelogs01/oradata/ESTDB/archive/*.dbf | sed -e "s/:/ /g" -e "s/ / /g" | perl -lane 'BEGIN {%hash=();} $hash{"$F[5]$F[6]-$F[7]:00"}+= $F[4]; END {foreach $k (sort keys %hash) {print "$k " . int($hash{$k}/(1024*1024)) . " Mb"; } }' |
Posted by Ook at 05:44 0 comments
Monday, 3 November 2008
Lost msconfig.exe
The location is not in the path - rather it is held in a registry key Create a .reg file with the following contents Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\MSCONFIG.EXE] @="C:\\WINDOWS\\PCHealth\\HelpCtr\\Binaries\\MSConfig.exe" |
Posted by Ook at 13:56 0 comments
Subscribe to:
Posts (Atom)