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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to get a view with the records and not the sum

Author  Topic 

skiabox
Posting Yak Master

169 Posts

Posted - 2008-01-30 : 09:58:30
I have made a view that gets its values from another view.
Here is the view code :

SELECT bedalog, SUM(bedaposo) AS sbedaposo
FROM ErmisUser.QBEPROK
WHERE (bedaflarr = '1') AND (LEFT(bedakind, 1) <> 'P')
GROUP BY bedalog


How can I write a diferent view to get the bedaposo field and not its sum for each bedalog?
Thank you!

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-01-30 : 10:50:49
Remove GROUP BY and SUM().

If this is not what you want, please explain in clear terms what is your purpose.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -