<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: ANY Types, Pipelined Table Functions, Dynamic SQL and Pivot</title>
	<atom:link href="http://awads.net/wp/2008/06/05/any-types-pipelined-table-functions-dynamic-sql-and-pivot/feed/" rel="self" type="application/rss+xml" />
	<link>http://awads.net/wp/2008/06/05/any-types-pipelined-table-functions-dynamic-sql-and-pivot/</link>
	<description>News, views, tips and tricks on Oracle and other fun stuff</description>
	<pubDate>Thu, 20 Nov 2008 22:57:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: nosizwe mxobo</title>
		<link>http://awads.net/wp/2008/06/05/any-types-pipelined-table-functions-dynamic-sql-and-pivot/#comment-52209</link>
		<dc:creator>nosizwe mxobo</dc:creator>
		<pubDate>Tue, 22 Jul 2008 08:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=731#comment-52209</guid>
		<description>Hi
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 
 select  case when status  "Attended' then
             backcolor =  green
       else  status
  end  case 


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 
select    CASE  WHEN f.segment10 = string then 
                              REPLACE (CAST (f.segment10 AS VARCHAR (10)),   'R',  '  '   )
                                     when   f.segment10  = varchar then
                                           convert(To_decimal(8,2),f.segment10 )
               ELSE f.segment10
            END cost_per_person, 
your response will be highly appreciated.
Regards

Nosizwe Mxobo
Marang Oracle Centre of excellence : HRMS Business Intelligence
Tel: 27 (21) 403 8075
Fax: 27 (21) 403 3657
Cell: 082 064 4691
www.parliament.gov.za</description>
		<content:encoded><![CDATA[<p>Hi<br />
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 &#8216; NOT ATTENDED&#8217;,Im thinking of a coding like this<br />
 select  case when status  &#8220;Attended&#8217; then<br />
             backcolor =  green<br />
       else  status<br />
  end  case </p>
<p>the second one is this field called Cost_per_person is captured in string  data type and other values are having &#8216;R&#8217; 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(&#8217;NOT YET PAID&#8217;).I  want to have a  code like this one<br />
select    CASE  WHEN f.segment10 = string then<br />
                              REPLACE (CAST (f.segment10 AS VARCHAR (10)),   &#8216;R&#8217;,  &#8216;  &#8216;   )<br />
                                     when   f.segment10  = varchar then<br />
                                           convert(To_decimal(8,2),f.segment10 )<br />
               ELSE f.segment10<br />
            END cost_per_person,<br />
your response will be highly appreciated.<br />
Regards</p>
<p>Nosizwe Mxobo<br />
Marang Oracle Centre of excellence : HRMS Business Intelligence<br />
Tel: 27 (21) 403 8075<br />
Fax: 27 (21) 403 3657<br />
Cell: 082 064 4691<br />
<a href="http://www.parliament.gov.za" rel="nofollow">http://www.parliament.gov.za</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
