I have a SQL that summarizes the quantity per week. The weeks that has no value does not exist in the table. How can I add these missing weeks with a 0 value in the SQL. Need this to use Avg and stddev functions.
SELECT t.material, t.description,
Sum(t.sales_quantity ) qty, to_char(t.Posting_Date,'IYYYIW') year_week
FROM tblBilling t
Where t.material = 'label900'
And t.Posting_date >= to_date('2008-10-20','yyyy-mm-dd')
And t.Posting_date <= to_date('2009-10-20','yyyy-mm-dd')
Group By t.material, t.description, to_char(t.Posting_Date,'IYYYIW')
This return:
material descriotion qty year_week
label900 test 20000 200850
label900 test 10000 200910
label900 test 5000 200912
label900 test 6000 200914
label900 test 9000 200920
I want it to complement the missing weeks with 0. Like this:
material descriotion qty year_week
label900 test 0 200843
label900 test 0 200844
label900 test 0 200845
label900 test 0 200846
label900 test 0 200847
label900 test 0 200848
label900 test 0 200849
label900 test 20000 200850
label900 test 0 200851
--and so on
Beginner question regarding Array's
Hi everyone, the page im working on has an array of variable at the top...Code: $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME'
Run function every 5 mins ??
I have a function PostMessage()How can I run it every 5 mins ??
PEAR Email Attachment w/ $gpg
I have no issues with this code if I take out the attachement section and include the info in the email body instead. However, I want the info to be in an email attachment. I do receive the email,
getting rid of quotes in strings
sick of trying to deal with them in multiple ways (entering in and taking from database, echoing, echoing within a text input, etc) so i would just like to get rid of them.turn: bob's houseinto: bobs
i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individually ( I have a header.php and footer.php) but when I try to run then using a content page with the
Operating System
How in PHP or other language can I detect Operating system, ie Windows XP Home, Windows 7 Ultimate, Mac OS 10?Anyone know how?Thanks
Sales orders ans reservations not taken into account on MPS / MRP
Hello,
SELECT * FROM users WHERE Users are not in Blocked
How do I select all users from users table where there users_id is not stored in the block table
puting for loop in 1 value
hi ,how do i put this code in 1 value:Code: <?phpfor ($i=1; $i<=5; $i++) { echo $i ; }?>the output will be: 12345how do i put the result in one value ,some thing like :if the
Multi Level Array Problem
hi all,For example I have array like below:$temp = array(array('north america', 'us', 'california'), array('north america', 'us', 'hawaii'), array('north america', 'canada', 'vancouver'),