Re: I upsized but these SQL statements are causing errors...
From: Steven Scaife (sp_at_nospam.com)
Date: 09/09/04
- Next message: Aaron [SQL Server MVP]: "Re: I upsized but these SQL statements are causing errors..."
- Previous message: Steven Scaife: "Re: When resubmitting a long page, how do you preserve the vertical position on the page?"
- In reply to: Mike: "I upsized but these SQL statements are causing errors..."
- Next in thread: Aaron [SQL Server MVP]: "Re: I upsized but these SQL statements are causing errors..."
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 9 Sep 2004 17:49:23 +0100
I'm not too sure but according to books online they are usable here is what
books online says
SUM
Returns the sum of all the values, or only the DISTINCT values, in the
expression. SUM can be used with numeric columns only. Null values are
ignored.
Syntax
SUM ( [ ALL | DISTINCT ] expression )
Arguments
ALL
Applies the aggregate function to all values. ALL is the default.
DISTINCT
Specifies that SUM return the sum of unique values.
expression
Is a constant, column, or function, and any combination of arithmetic,
bitwise, and string operators. expression is an expression of the exact
numeric or approximate numeric data type category, except for the bit data
type. Aggregate functions and subqueries are not permitted.
and for iif
IIf
Returns one of two numeric or string values determined by a logical test.
Syntax
Numeric
IIf(«Logical Expression», «Numeric Expression1», «Numeric Expression2»)
This function returns «Numeric Expression1» if «Logical Expression»
evaluates to TRUE, otherwise returns «Numeric Expression2».
String
IIf(«Logical Expression», «String Expression1», «String Expression2»)
This function returns «String Expression1» if «Logical Expression» evaluates
to TRUE, otherwise returns «String Expression2».
check books online for more about these just thought these descriptions
might help, someone will be able to tell you better if this is no good to
you
"Mike" <mike_newsgroups@yahoo.com> wrote in message
news:6a68ace3.0409090831.6735eaea@posting.google.com...
> OK after all the "get rid of Access" stuff I finally starting upsizing
> to sql server. However, some of the sql is breaking now. It seems to
> be my use of stuff like
>
> sum(trade)
> sum(iif(want>0,1,0))
>
> what is the sql server equivalent sql of sum and iif?
>
> Thanks,
> Mike
- Next message: Aaron [SQL Server MVP]: "Re: I upsized but these SQL statements are causing errors..."
- Previous message: Steven Scaife: "Re: When resubmitting a long page, how do you preserve the vertical position on the page?"
- In reply to: Mike: "I upsized but these SQL statements are causing errors..."
- Next in thread: Aaron [SQL Server MVP]: "Re: I upsized but these SQL statements are causing errors..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|