PC Review


Reply
 
 
kazanç evi
Guest
Posts: n/a
 
      18th Aug 2008
Dell toutes nos meilleurs offres
Dell all our best deals
Dell alle unsere Top-Angebote
Dell todas nuestras mejores ofertas
Dell alle vores bedste tilbud
Dell kaikki parhaamme käsitellään
Dell tutte le nostre migliori offerte
???????????
???????????
?? ?? ??? ??
Dell ??? ?? ???? ?? ???? ???????
http://www1.euro.dell.com/content/de...676&lid=137598



"Marcus" <(E-Mail Removed)> a écrit dans le message de
news:P5qdnf0EYZpeW-(E-Mail Removed)...
>I have built a stored procedure that:
> - Drops a temptable if it exists
> - Creates the temptable
> - a SELECT is performed on the temptable
>
> No syntax errors. No records returned (The procedure executed successfully
> but did not return records)
> If I execute the steps, one by one the work pretty well....
>
> What can I do?
>
> ***************************************************************************************************
> ALTER PROCEDURE dbo.trendBalance AS
> BEGIN
>
> if EXISTS (select * from INFORMATION_SCHEMA.tables where table_name =
> 'tempBalance' ) DROP TABLE tempBalance;
>
> SELECT TOP 100 PERCENT SUM(CASE WHEN Gruppo = 5 AND dare > 0 THEN (Dare)
> ELSE 0 END) - SUM(CASE WHEN Gruppo = 5 AND avere > 0 THEN (avere) ELSE 0
> END) AS Crediti,
> SUM(CASE WHEN Gruppo = 8 THEN Avere ELSE 0 END) - SUM(CASE WHEN
> Gruppo = 8 THEN Dare ELSE 0 END) AS Debiti, SUM(CASE WHEN Gruppo = 40 THEN
> Avere ELSE 0 END)
> - SUM(CASE WHEN Gruppo = 40 THEN Dare ELSE 0 END) AS [Valore
> della produzione], SUM(CASE WHEN Gruppo = 50 THEN Dare ELSE 0 END) -
> SUM(CASE WHEN Gruppo = 50 THEN avere ELSE 0 END)
> AS [Costi per la produzione], SUM(CASE WHEN Gruppo = 60 THEN
> Dare ELSE 0 END) - SUM(CASE WHEN Gruppo = 60 THEN Avere ELSE 0 END) AS
> [Spese di Gestione],
> SUM(CASE WHEN conto = 7 THEN Dare ELSE 0 END) - SUM(CASE WHEN
> conto = 7 THEN avere ELSE 0 END) AS Stipendi, YEAR(dbo.[C -
> Giornale].[Data operazione]) AS Anno,
> MONTH(dbo.[C - Giornale].[Data operazione]) AS Mese INTO
> tempBalance
> FROM dbo.[C - Dettaglio Giornale] INNER JOIN
> dbo.[C - Giornale] ON dbo.[C - Dettaglio Giornale].[ID
> Giornale] = dbo.[C - Giornale].[ID Giornale]
> GROUP BY YEAR(dbo.[C - Giornale].[Data operazione]), MONTH(dbo.[C -
> Giornale].[Data operazione])
> ORDER BY YEAR(dbo.[C - Giornale].[Data operazione]), MONTH(dbo.[C -
> Giornale].[Data operazione]) ;
>
>
> Select crediti, debiti, [Valore della produzione], [Costi per la
> produzione], [Spese di Gestione], Stipendi,
> convert(datetime,convert(varchar(4),Anno) + (CASE WHEN mese < 10 THEN '0'
> + convert(varchar(1),mese) ELSE convert(varchar(2),mese) END) + '01')
> FROM tempBalance;
>
> END


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: choosing size of anti-glare filter for a Dell XPS one and Dell ST2420L 24" W Full HD Monitor Joel Computer Hardware 6 2nd May 2011 11:20 PM
Re: choosing size of anti-glare filter for a Dell XPS one and Dell ST2420L 24" W Full HD Monitor VanguardLH Computer Hardware 0 2nd Apr 2011 10:08 AM
Got My Older Dell 8400 Repaired By Using Parts From My Broken Dell XPS 600 And Installed RC1! Kevin John Panzke Windows Vista General Discussion 14 21st Sep 2006 04:35 PM
Advice please on cloning a fresh Dell laptop drive to include Dell restore and utiiltiy partions teacher Windows XP Hardware 1 29th Apr 2005 12:48 AM
Dell Dimension 8200- Random Artifacts & characters on Dell splash screen?? James DIY PC 4 6th Dec 2004 06:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:17 PM.