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
Help With editting and deleting form
So look at this image :http://img194.imageshack.us/img194/8272/snapshot5f.png This table prints the titles of entries from a table in a database.. The code that i use for this table is this :Code:
Windows 7
Windows 7 default user account control worries experts. Corporate IT departments should be pleased with new security measures in Windows 7, but consumers are still at risk of getting hit by malware
Points for Wiki contribution
Hi everyone,
question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.I have roughly 30 files. I want to be able to edit every $_POST and $_GETCode:
Multi-image upload problems
Lets see if I can get some help on this one. Can anyone show me what I am doing wrong here. I'm just trying at this point to verify that the form inputs will work right. $max_img is set to 6. Here is
Why is this query failing?
Why is this not working?$query = "SELECT * FROM `users` WHERE `userid` = " . $USERID AND `pin` = " . $PIN;$result = mysql_query($query) or die("Web site query
Can anyone give me some link on .htaccess tutorial
i wish to have friendly url using .htaccess, but no idea yet about this Hope that anyone could give me a simple .htaccess tutorialthanks
Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_html/index.php on line 25<html><head><title>CrazyQuest -
CURL question
i am wondering if it's possible to use multi curl with login something likelogin once to website and after that use multi curl to download several pagesthank you
get url?
how do i get the url of the page i'm currently on, on my website.. i think its get header.. how do i do that?