SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL sum total problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Black_Trouble
Starting Member

Turkey
21 Posts

Posted - 11/27/2012 :  10:12:50  Show Profile  Reply with Quote
I want to do, but somehow I could not balance the system moving.


SELECT TARIH,
       ACIKLAMA,BORC,ALACAK
	  from ( SELECT CONVERT(DATETIME,a.[MUHHARTAR],104) as TARIH
      ,a.[MUHHARMUHKOD] as KOD
      ,a.[MUHHARACIKLAMA] as ACIKLAMA
      ,case a.[MUHHARBATIPI]
	  when '1' then CONVERT(DECIMAL(18,2),a.MUHHARTUTAR)
	  END AS BORC
	  ,CASE a.[MUHHARBATIPI]
	  WHEN '2' THEN CONVERT(DECIMAL(18,2),a.MUHHARTUTAR)
	 END AS ALACAK 
	 FROM [dbo].[MUHHAR] as a WHERE MUHHARMUHKOD='120 01 395' ) 
	   as a
	   group by TARIH,ACIKLAMA,BORC,ALACAK
	  order by TARIH ASC


I SAID I WANT TO DO

TARIH ACIKLAMA BORC ALACAK BAKIYE
07.08.2012 TCA INSAAT 4355,00 0,00 4355,00
07.08.2012 TCA INSAAT 200,00 0,00 4555,00
07.08.2012 TCA INSAAT 00,00 500,00 4055,00





Edited by - Black_Trouble on 11/27/2012 10:14:03

sodeep
Flowing Fount of Yak Knowledge

USA
7174 Posts

Posted - 11/27/2012 :  10:22:01  Show Profile  Reply with Quote
Your question is not clear.

Here is how: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Edited by - sodeep on 11/27/2012 10:25:12
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000