<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Eddie Awad’s Blog - Latest Comments in ANY Types, Pipelined Table Functions, Dynamic SQL and Pivot</title><link>http://awads.disqus.com/</link><description>News, views, tips and tricks on Oracle and other fun stuff</description><language>en</language><lastBuildDate>Tue, 22 Jul 2008 04:51:00 -0000</lastBuildDate><item><title>Re: ANY Types, Pipelined Table Functions, Dynamic SQL and Pivot</title><link>http://awads.net/wp/2008/06/05/any-types-pipelined-table-functions-dynamic-sql-and-pivot/#comment-3659551</link><description>Hi&lt;br&gt;I would like you to help me  to come up with desired results for this report.I am currently preparing a script in SQL for people who has attended course now what i want the report to  do is to highlight the  entire row  green if the column  STATUS contains the value ' NOT ATTENDED',Im thinking of a coding like this &lt;br&gt; select  case when status  "Attended' then&lt;br&gt;             backcolor =  green&lt;br&gt;       else  status&lt;br&gt;  end  case &lt;br&gt;&lt;br&gt;&lt;br&gt;the second one is this field called Cost_per_person is captured in string  data type and other values are having 'R' before(R4562,00) and the comma is not used to separate thousand is for hundrends instead.Now   i want to convert all the numbers to decimal and leave those  rows that contains characters('NOT YET PAID').I  want to have a  code like this one &lt;br&gt;select    CASE  WHEN f.segment10 = string then &lt;br&gt;                              REPLACE (CAST (f.segment10 AS VARCHAR (10)),   'R',  '  '   )&lt;br&gt;                                     when   f.segment10  = varchar then&lt;br&gt;                                           convert(To_decimal(8,2),f.segment10 )&lt;br&gt;               ELSE f.segment10&lt;br&gt;            END cost_per_person, &lt;br&gt;your response will be highly appreciated.&lt;br&gt;Regards&lt;br&gt;&lt;br&gt;Nosizwe Mxobo&lt;br&gt;Marang Oracle Centre of excellence : HRMS Business Intelligence&lt;br&gt;Tel: 27 (21) 403 8075&lt;br&gt;Fax: 27 (21) 403 3657&lt;br&gt;Cell: 082 064 4691&lt;br&gt;&lt;a href="http://www.parliament.gov.za" rel="nofollow"&gt;www.parliament.gov.za&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nosizwe mxobo</dc:creator><pubDate>Tue, 22 Jul 2008 04:51:00 -0000</pubDate></item></channel></rss>