Click here to Skip to main content
15,920,828 members
Home / Discussions / Database
   

Database

 
QuestionSQL Server Management Studio Express and Locks Pin
Kuira16-Jul-06 14:07
Kuira16-Jul-06 14:07 
AnswerRe: SQL Server Management Studio Express and Locks Pin
Frank Kerrigan18-Jul-06 1:59
Frank Kerrigan18-Jul-06 1:59 
Questioncorrupted database [modified] Pin
illusionFinder16-Jul-06 3:55
illusionFinder16-Jul-06 3:55 
AnswerRe: corrupted database Pin
Paul Conrad17-Jul-06 8:08
professionalPaul Conrad17-Jul-06 8:08 
AnswerRe: corrupted database Pin
ra ra ra ra17-Jul-06 22:42
ra ra ra ra17-Jul-06 22:42 
QuestionReturn 0 when no rows [modified] Pin
Heinz_15-Jul-06 13:49
Heinz_15-Jul-06 13:49 
AnswerRe: Return 0 when no rows Pin
ra ra ra ra16-Jul-06 23:26
ra ra ra ra16-Jul-06 23:26 
GeneralRe: Return 0 when no rows [modified] Pin
Heinz_17-Jul-06 9:30
Heinz_17-Jul-06 9:30 
Hi, you're right, there's a inner join inside my query, check it out, hope you understand the query and the problem:

select SUM((t1.valor + t1.total) - t2sum) from consultas as t1 inner join (select consulta, SUM(cantidad_pagada) as t2sum from pagos_consultas where fecha_pago='2006-07-05' group by consulta) as t2 on t2.consulta=t1.id where t1.nula=0 and t1.pagada=0 and t1.fecha='2006-07-05'

I had no idea about left and right join so i went to http://www.w3schools.com/sql/sql_join.asp and took a read, the left join is the one for me! but this will return NULL in the second table when there're no matches and if you look at my query in "(t1.valor + t1.total) - t2sum" i do a " - " operation and i cant reduce a number with a null value or can i? i must replace that null for a 0.

Thanx man.

-- modified at 15:42 Monday 17th July, 2006
GeneralRe: Return 0 when no rows Pin
Ennis Ray Lynch, Jr.17-Jul-06 12:42
Ennis Ray Lynch, Jr.17-Jul-06 12:42 
GeneralRe: Return 0 when no rows [modified] Pin
ra ra ra ra17-Jul-06 22:22
ra ra ra ra17-Jul-06 22:22 
GeneralRe: Return 0 when no rows [modified] Pin
Heinz_18-Jul-06 8:27
Heinz_18-Jul-06 8:27 
Questioncan we create stored procedures in MS Access database Pin
ChennaiBabu14-Jul-06 21:15
ChennaiBabu14-Jul-06 21:15 
AnswerRe: can we create stored procedures in MS Access database Pin
mysorian15-Jul-06 4:43
professionalmysorian15-Jul-06 4:43 
AnswerRe: can we create stored procedures in MS Access database Pin
ra ra ra ra17-Jul-06 22:28
ra ra ra ra17-Jul-06 22:28 
Questionstored procedure Output parameter value is Null Pin
For_IT14-Jul-06 12:26
For_IT14-Jul-06 12:26 
AnswerRe: stored procedure Output parameter value is Null Pin
nguyenvhn14-Jul-06 16:24
nguyenvhn14-Jul-06 16:24 
AnswerRe: stored procedure Output parameter value is Null Pin
Colin Angus Mackay14-Jul-06 21:53
Colin Angus Mackay14-Jul-06 21:53 
GeneralRe: stored procedure Output parameter value is Null Pin
Mike Dimmick15-Jul-06 3:57
Mike Dimmick15-Jul-06 3:57 
GeneralRe: stored procedure Output parameter value is Null Pin
For_IT16-Jul-06 11:05
For_IT16-Jul-06 11:05 
GeneralRe: stored procedure Output parameter value is Null Pin
For_IT16-Jul-06 12:18
For_IT16-Jul-06 12:18 
QuestionProblem accessing a SSIS Package Pin
mysorian14-Jul-06 6:04
professionalmysorian14-Jul-06 6:04 
AnswerRe: Problem accessing a SSIS Package Pin
mysorian14-Jul-06 7:54
professionalmysorian14-Jul-06 7:54 
AnswerRe: Problem accessing a SSIS Package Pin
Dave Kreskowiak14-Jul-06 9:30
mveDave Kreskowiak14-Jul-06 9:30 
GeneralRe: Problem accessing a SSIS Package Pin
mysorian15-Jul-06 4:39
professionalmysorian15-Jul-06 4:39 
QuestionDifferance between '@variable' and '@@variable' in SQL Pin
Sampath Eleperuma14-Jul-06 4:09
professionalSampath Eleperuma14-Jul-06 4:09 

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.