-
Website
http://awads.net/wp/ -
Original page
http://awads.net/wp/2008/06/05/any-types-pipelined-table-functions-dynamic-sql-and-pivot/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
jgarry
3 comments · 1 points
-
Andy C
22 comments · 47 points
-
dahowlett
1 comment · 2 points
-
Don Seiler
9 comments · 1 points
-
davidhaimes
4 comments · 3 points
-
-
Popular Threads
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