Click here to Skip to main content
15,918,330 members
Home / Discussions / Database
   

Database

 
GeneralRe: nth highest salary Pin
sudharsong9-Aug-06 22:49
sudharsong9-Aug-06 22:49 
GeneralRe: nth highest salary Pin
sudharsong9-Aug-06 23:38
sudharsong9-Aug-06 23:38 
AnswerRe: nth highest salary Pin
Paul Conrad10-Aug-06 5:56
professionalPaul Conrad10-Aug-06 5:56 
QuestionSelect distinct date? Pin
blurMember9-Aug-06 21:15
blurMember9-Aug-06 21:15 
Questionrunning a proc with parameter in reporting services Pin
uglyeyes9-Aug-06 16:39
uglyeyes9-Aug-06 16:39 
QuestionReturning latest location by date - Query Help [modified] Pin
martin_hughes9-Aug-06 10:06
martin_hughes9-Aug-06 10:06 
AnswerRe: Returning latest location by date - Query Help Pin
Eric Dahlvang9-Aug-06 10:28
Eric Dahlvang9-Aug-06 10:28 
QuestionCalculating Costs Pin
si_699-Aug-06 5:16
si_699-Aug-06 5:16 
Hi All

I want to calculate the total of some monatry amounts within a table
i can do this by the following

declare @cost1 money
select @cost1 =sum(cost)from mydb..amounts

sometimes though there maybe no records in the amounts table, and the above statement would then return NULL

instead of NULL i would like it to return 0
i would like to do something like

select @cost1 =sum(cost) 0 as null from mydb..amounts

but this doesnt work

does anyone have any ideas ??

Thanks

Si





AnswerRe: Calculating Costs Pin
Chris Meech9-Aug-06 5:39
Chris Meech9-Aug-06 5:39 
GeneralRe: Calculating Costs Pin
si_699-Aug-06 5:45
si_699-Aug-06 5:45 
AnswerRe: Calculating Costs Pin
Jon Sagara9-Aug-06 6:21
Jon Sagara9-Aug-06 6:21 
QuestionIs there any way I can get SQL to return XML wrapped in root tags ? Pin
Red_Wizard_Shot_The_Food9-Aug-06 4:55
Red_Wizard_Shot_The_Food9-Aug-06 4:55 
QuestionBulk insert into SQL Server 2005 with a Generic List .NET 2.0 Pin
abnorm9-Aug-06 3:03
abnorm9-Aug-06 3:03 
QuestionTwo BindingContext's don't work Pin
KeesVer9-Aug-06 1:22
KeesVer9-Aug-06 1:22 
Questionwav files Pin
md_refay8-Aug-06 11:30
md_refay8-Aug-06 11:30 
AnswerRe: wav files Pin
Colin Angus Mackay8-Aug-06 12:29
Colin Angus Mackay8-Aug-06 12:29 
QuestionStored procedures and DataAdapters Pin
TheJudeDude8-Aug-06 6:36
TheJudeDude8-Aug-06 6:36 
AnswerRe: Stored procedures and DataAdapters Pin
Stephen McGuire8-Aug-06 12:32
Stephen McGuire8-Aug-06 12:32 
GeneralRe: Stored procedures and DataAdapters Pin
Krisky8-Aug-06 20:59
Krisky8-Aug-06 20:59 
QuestionDatabase Projects: Is there an equivalent in VS2005 for Generate Command File from VS2003?? [modified] Pin
LongRange.Shooter8-Aug-06 6:03
LongRange.Shooter8-Aug-06 6:03 
QuestionSqlDataTable queries Pin
TintinV3ck8-Aug-06 1:54
TintinV3ck8-Aug-06 1:54 
AnswerRe: SqlDataTable queries Pin
Frank Kerrigan8-Aug-06 3:06
Frank Kerrigan8-Aug-06 3:06 
Questionselect sound Pin
md_refay8-Aug-06 1:04
md_refay8-Aug-06 1:04 
AnswerRe: select sound Pin
Frank Kerrigan8-Aug-06 1:08
Frank Kerrigan8-Aug-06 1:08 
GeneralRe: select sound Pin
Frank Kerrigan8-Aug-06 2:44
Frank Kerrigan8-Aug-06 2:44 

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.