Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mana
Posting Yak Master
102 Posts |
Posted - 2014-07-25 : 07:13:13
|
Hello I have the below code but the result is not that i wantcan you helo me please?UPDATE AMPPU_Alle_Fehlteile SET summenew2 = avg_bereichFROM AMPPU_Alle_Fehlteile AINNER JOIN (select Offline_date,Bereich,AVG(ARTPU1) AS avg_bereich FROMAMPPU_Alle_Fehlteile group by Offline_date,Bereich,YEAR(Offline_date), MONTH(Offline_date)) B ON MONTH(A.Offline_date) = MONTH (B.Offline_date) and YEAR(A.Offline_date) = YEAR(B.Offline_date) ; |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-07-25 : 09:29:39
|
To hello you with this, please post:1. CREATE TABLE commands to create the tables for your query2. INSERT INTO commands to populate the tables with test data3. The results you are getting from your query when executed against these tables4. The results you want. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-07-25 : 12:31:21
|
http://www.sqlservercentral.com/articles/Best+Practices/61537/Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
|
|
|