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
some questions
Hello,I am looking for the answers for following questions:1) Does PHP support overloading or overriding? How?2) Difference between reply-to and return-path in header of a mail function?3) Importance
Question about ShowWindow()
Hello....I'm struggling with sumpin, and I hope y'all can help.I've got a CFormView with a small web browser control (CWebBrowser2), that only needs to be displayed occasionally, when a user selects a
PHP and MySQL on intranet?
Is it possible to use both these on an intranet network?
Receive Rosettanet Message to SAP 4.6c
Dear all ,
Pre-Fill out a PHP form...??
This is for work actually (geek squad). We have to fill out this online php form at work over and over again to set up these new laptops, we log on to this website and have to select all this stuff. I
update sql when refresh - php
hiI have made a table (attachement)the users can update the sql database using + or x buttons.My problem is that the last row under value2 decreases by one everytime i refresh the page. How do i
Disabling SAP menu
How do I disable SAP menu for all the users and just restrict them to User Menu in SAP ECC 6.0?
contact form - output to page and email
I have the following in my controller:$message['name'] = htmlentities(strip_tags(trim($_POST['name']))); $message['email'] = htmlentities(strip_tags(trim($_POST['email'])));$to =
Search with relational database
Hey,I have quite a complicated (for me anyway ) relational database for an apartments system I am developing.Keith (kickstart) was very helpful assisting me in creating the relationships and here is
simple script won't work. Please help
I'm new to php, and I am having trouble displaying a simple script in my web browser. My php code executes fine but the html tags in my script are treated as text and displayed on the page. This is