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
 General SQL Server Forums
 New to SQL Server Programming
 GROUP BY

Author  Topic 

UNSAL
Starting Member

17 Posts

Posted - 2009-01-07 : 03:09:38
söyle bir mantigi acaba nasil yerlestirim.

ana kebir muavin borc alacak borcbakiye alacakbakiye
100 150 50 100 -
100 01 100 200 - 200
100 01 001 75 50 25 -

burda yapmak istedigim borc,alacak sutunlarini ana sutunu için sonra kebir sutunu içinde sonrada muavin sutunu için gruplandirarak toplayip borc - alacak = sonuc + ise borcbakiye - ise alacak bakiyeye yazirmak
bunu yaptim tabi yikaridako yazdigim kodla ama ana,kebir,muavim sutunlarina tam oturtamadim. bunun için acaba yazilacak basla bir kod sekli varmidir.

UNSAL OSMA/TURKEY/ANTALYA

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-07 : 03:11:58
can you please explain this in English?
Go to Top of Page

Nageswar9
Aged Yak Warrior

600 Posts

Posted - 2009-01-07 : 03:23:45
we can't Understand ur languge and whats ur requirement?
Go to Top of Page

UNSAL
Starting Member

17 Posts

Posted - 2009-01-07 : 03:41:52
column1-column2-column3-money
100 500
100 01 400
100 01 001 400
100 02 100
100 02 001 100

I can SQL query mit group by column1,column2,column3 and sum money ?



UNSAL OSMA/TURKEY/ANTALYA
Go to Top of Page

UNSAL
Starting Member

17 Posts

Posted - 2009-01-07 : 04:36:31
column1-column2-column3-money
100 500
100 01 400
100 01 001 400
100 02 100
100 02 001 100

I can SQL query mit group by column1,column2,column3 and sum money ?



UNSAL OSMA/TURKEY/ANTALYA

UNSAL OSMA/TURKEY/ANTALYA
Go to Top of Page

sakets_2000
Master Smack Fu Yak Hacker

1472 Posts

Posted - 2009-01-07 : 05:24:23
[code]select
column1,column2,column3,sum([money])
from
yourtable
group by
column1,column2,column3[/code]
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-07 : 08:56:11
quote:
Originally posted by UNSAL

column1-column2-column3-money
100 500
100 01 400
100 01 001 400
100 02 100
100 02 001 100

I can SQL query mit group by column1,column2,column3 and sum money ?



UNSAL OSMA/TURKEY/ANTALYA

UNSAL OSMA/TURKEY/ANTALYA


whats will be your expected output out of above data?
Go to Top of Page
   

- Advertisement -