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
ScriptResource.axd gives an error on fresh install of ASP.NET Ajax 1.0
Hello,I have a fresh install of Microsoft ASP.NET Ajax 1.0. When I create an Ajax enabled website in Visual Studio, and immediately run the Default.aspx page I get a javascript error: Sys is not
browse folder only
hi,is there a way i can browse or get the directory or folder only and not the file?i just want to browse the directory and get the files from it.
Beginners syntax and loop questions - help please!
Hi everyone,I have some problems with php code. I'm currently in the middle of learning php, but these problems have got me stuck fast. But also have a question regarding looping that i'll ask in the
Not reloading page after php form submit
Hello helpful souls out there. You guys have come through for me in the recent past and I'm hoping someone out there can either help me or point me in the right direction.I have the following site,
Need to write a cookie with a url var
Not sure if its possible, but I need to write a cookie with a url.So this would write 2232 as the cookie for ID.http://www.example.com/redirect.php?ID=2232Ultimately, I'm working on a pixel tracking
php or sql?
Sorry not sure if this is a sql problem or php the following code is supposed to delete data from the sql. However when I click delete nothing happens.Code:
want to add a break after a certain amount of characters
i was wondering how to add a break in a blog post after a certain amount of characters... any idea on how to do this???this is the code i'm workig with<?php$connect =
is this the proper use of mysql_real_escape_string() to prevent sql injections?
i was wondering is this the proper use of mysql_real_escape_string() to prevent sql injections? any help greatly appreciated. thanks. derekCode:
j1inmis Ouput layout changes
Hi,
Fetching META TAGS through
Hello everybodyI want to fetch meta tags of a domain.It will be done from following code of index.phpCode: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"