Click here to Skip to main content
15,849,130 members
Home / Discussions / Database
   

Database

 
AnswerRe: Looking for advice on key/value storage options Pin
k505416-Jul-21 15:21
mvek505416-Jul-21 15:21 
GeneralRe: Looking for advice on key/value storage options Pin
Chris Maunder16-Jul-21 17:19
cofounderChris Maunder16-Jul-21 17:19 
AnswerRe: Looking for advice on key/value storage options Pin
Gerry Schmitz9-Aug-21 7:04
mveGerry Schmitz9-Aug-21 7:04 
GeneralRe: Looking for advice on key/value storage options Pin
Chris Maunder9-Aug-21 7:22
cofounderChris Maunder9-Aug-21 7:22 
QuestionOpen Office Database Pin
Bram van Kampen1-Jul-21 15:26
Bram van Kampen1-Jul-21 15:26 
AnswerRe: Open Office Database Pin
Richard MacCutchan1-Jul-21 22:04
mveRichard MacCutchan1-Jul-21 22:04 
GeneralRe: Open Office Database Pin
Bram van Kampen2-Jul-21 15:54
Bram van Kampen2-Jul-21 15:54 
QuestionSelect with pivot Pin
Ismael Oliveira 202119-Jun-21 19:25
Ismael Oliveira 202119-Jun-21 19:25 
Hi, everyone.
I'm trying to recover data from SQL Server using the pivot operator. My command is:
select isnull([1], 0) as Janeiro,
       isnull([2], 0) as Fevereiro,
	   isnull([3], 0) as Março,
	   isnull([4], 0) as Abril,
	   isnull([5], 0) as Maio,
	   isnull([6], 0) as Junho,
	   isnull([7], 0) as Julho,
	   isnull([8], 0) as Agosto,
	   isnull([9], 0) as Setembro,
	   isnull([10], 0) as Outubro,
	   isnull([11], 0) as Novembro,
	   isnull([12], 0) as Dezembro
from (select month(PP.PAPA_DT_DATAPAGAMENTO) as Mesn, PP.PAPA_RE_VALORPAGAMENTO from PAGAMENTO_PARCELA PP, PAGAMENTO P
     where PP.MOVI_NA_CODIGO = P.MOVI_NA_CODIGO AND P.SUPA_NA_CODIGO = 5) Tab1
pivot (sum(PAPA_RE_VALORPAGAMENTO) for Mesn in ([1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12])) P1

The way it is above it works fine. Now I need to multiply the sum by a factor, say 0.95. I tried the following:
pivot (0.95 * sum(PAPA_RE_VALORPAGAMENTO) ...
pivot (sum(0.95 * PAPA_RE_VALORPAGAMENTO) ...
0.95 * pivot (sum(PAPA_RE_VALORPAGAMENTO) ...
None of these worked. Can anyone help me? Which is the right way?
Thanks.
AnswerRe: Select with pivot Pin
CHill6023-Jun-21 5:50
mveCHill6023-Jun-21 5:50 
GeneralRe: Select with pivot !! Pin
User 1407655213-Jul-21 22:34
User 1407655213-Jul-21 22:34 
GeneralRe: Select with pivot !! Pin
CHill6014-Jul-21 4:50
mveCHill6014-Jul-21 4:50 
GeneralRe: Select with pivot !! Pin
User 1407655214-Jul-21 4:58
User 1407655214-Jul-21 4:58 
GeneralRe: Select with pivot !! Pin
CHill6014-Jul-21 5:09
mveCHill6014-Jul-21 5:09 
QuestionAbout MySQL table permission removal failed Pin
Member 1105472311-Jun-21 9:00
Member 1105472311-Jun-21 9:00 
AnswerRe: About MySQL table permission removal failed Pin
Richard Deeming13-Jun-21 23:09
mveRichard Deeming13-Jun-21 23:09 
QuestionSandwich Query For Employee Attendance using SQL Server 2005 Pin
Mohammad Salmani8-Jun-21 21:40
Mohammad Salmani8-Jun-21 21:40 
AnswerRe: Sandwich Query For Employee Attendance using SQL Server 2005 Pin
Richard MacCutchan8-Jun-21 22:55
mveRichard MacCutchan8-Jun-21 22:55 
AnswerRe: Sandwich Query For Employee Attendance using SQL Server 2005 Pin
SeeSharp29-Jun-21 2:35
SeeSharp29-Jun-21 2:35 
GeneralRe: Sandwich Query For Employee Attendance using SQL Server 2005 Pin
Mohammad Salmani9-Jun-21 4:08
Mohammad Salmani9-Jun-21 4:08 
GeneralRe: Sandwich Query For Employee Attendance using SQL Server 2005 Pin
SeeSharp29-Jun-21 4:39
SeeSharp29-Jun-21 4:39 
GeneralRe: Sandwich Query For Employee Attendance using SQL Server 2005 Pin
David Mujica9-Jun-21 5:25
David Mujica9-Jun-21 5:25 
GeneralRe: Sandwich Query For Employee Attendance using SQL Server 2005 Pin
Mycroft Holmes9-Jun-21 13:36
professionalMycroft Holmes9-Jun-21 13:36 
GeneralRe: Sandwich Query For Employee Attendance using SQL Server 2005 Pin
SeeSharp210-Jun-21 2:25
SeeSharp210-Jun-21 2:25 
GeneralRe: Sandwich Query For Employee Attendance using SQL Server 2005 Pin
Mycroft Holmes10-Jun-21 13:09
professionalMycroft Holmes10-Jun-21 13:09 
GeneralRe: Sandwich Query For Employee Attendance using SQL Server 2005 Pin
Mohammad Salmani10-Jun-21 22:53
Mohammad Salmani10-Jun-21 22:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.