Hi
I need sum the month totals
SELECT region_name, area_name
,SUM (CASE WHEN SUBSTR(yr_mth,5,2) = '07' THEN sales_target END) AS jul
,SUM (CASE WHEN SUBSTR(yr_mth,5,2) = '08' THEN sales_target END) AS aug
,SUM (CASE WHEN SUBSTR(yr_mth,5,2) = '09' THEN sales_target END) AS sep
,SUM (CASE WHEN SUBSTR(yr_mth,5,2) = '10' THEN sales_target END) AS oct
,SUM (CASE WHEN SUBSTR(yr_mth,5,2) = '11' THEN sales_target END) AS nov
,SUM (CASE WHEN SUBSTR(yr_mth,5,2) = '12' THEN sales_target END) AS dec
,SUM (CASE WHEN SUBSTR(yr_mth,5,2) = '01' THEN sales_target END) AS jan
,SUM (CASE WHEN SUBSTR(yr_mth,5,2) = '02' THEN sales_target END) AS feb
,SUM (CASE WHEN SUBSTR(yr_mth,5,2) = '03' THEN sales_target END) AS mar
,SUM (CASE WHEN SUBSTR(yr_mth,5,2) = '04' THEN sales_target END) AS apr
,SUM (CASE WHEN SUBSTR(yr_mth,5,2) = '05' THEN sales_target END) AS may
,SUM (CASE WHEN SUBSTR(yr_mth,5,2) = '06' THEN sales_target END) AS jun
FROM sales_forecast WHERE REGION_NAME like nvl('®IONNAME','%') AND
AREA_NAME like nvl('&AREANAME','%') AND
yr_mth=nvl('&Year',substr(yr_mth,1,4))||NVL(DECODE('&Month','JAN','01','FEB','02','MAR','03','APR','04','MAY','05',
'JUN','06','JUL','07','AUG','08','SEP','09','NOV','11','DEC','12'),substr(yr_mth,5,6))
GROUP BY region_name, area_name
ORDER BY region_name, area_name
Requirment
region_name, area_name, jul, aug ................ jun
abc xyz 10, 20.....................30
ccc ggg 20, 30.....................40
total 30, 50 ...................70
thanks
PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg" id="doLogin3" value="Login">ON FIREFOX it works finebut on
ereg_replace()
Basically what i need to do is $title = "This Suck's"$striped = ereg_replace("[^A-Za-z0-9]", " ", $title ); However, I only want it to strip the " ' "
Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the data into database.Why can this happen? how to prevent this?
Date Format
Hi there,I have a date format like this right now:Sat, 17 Oct 2009 17:04:00 I need to turn that into:2009-10-17T17:04:00ZMy thought process was to remove with regex "Sat," and then just
Session
I am having a little trouble with a session. Not sure if it is my browser or what. I know I do not have any trouble logging into forums such at these, so not sure why this is not working.first the
Else statement screws up all css
Does anyone know what goes wrong in the process with this php code?This code seems to be causing it: <?PHP } else { echo " <div
imap: how to save a copy of sent emails to sent elements
Hello my friends,I am writing an online emailing application with inbox outbox/sent elements etc.When I send and email with mail() function, what would I do in order to save to the sent
column name cancatenation within PL/SQL
I have a PLSQL store procedure, and the following statement is part of a subquery
Passing an array of values From VB6.0 to Oracle PL/SQL Function
Basically we are using VB6.0.
passing data from one page to another
hey guysi have the follwoing code to get information from one page and place on another:(1st page) page to get info from:Code: <?php session_start();$_SESSION['data'] = "blah blah