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 |
|
vision.v1
Yak Posting Veteran
72 Posts |
Posted - 2009-08-20 : 06:08:56
|
| Dear All,am new to sql server...In my application i want to update a filed called 'greater_than_180' for this purpose am usingselect statement like following...UPDATE #tempcountsSET greater_than_180 = a.cnt( SELECT DATE, COUNT(DATEDIFF(s,TALKSTAMP, ENDSTAMP)) AS cnt FROM TableA WHERE date='08/18/2009' AND DATEDIFF(s,TALKSTAMP, ENDSTAMP)>180 GROUP BY DATE)aIts giving some error message please give some idea |
|
|
Sachin.Nand
2937 Posts |
Posted - 2009-08-20 : 06:13:52
|
| UPDATE#tempcountsSET greater_than_180 = a.cnt FROM(SELECT DATE,COUNT(DATEDIFF(s,TALKSTAMP, ENDSTAMP)) AS cntFROM TableAWHEREdate='08/18/2009'ANDDATEDIFF(s,TALKSTAMP, ENDSTAMP)>180GROUP BY DATE)aPBUH |
 |
|
|
Shaj
Starting Member
3 Posts |
Posted - 2009-08-20 : 16:30:38
|
| can you post the error message? |
 |
|
|
|
|
|