Connecting Tech Pros Worldwide Help | Site Map

COALESCE a Session Var ASP

=?Utf-8?B?R1ROMTcwNzc3?=
Guest
 
Posts: n/a
#1: Oct 23 '08
Hi All, is this the correct way to Coalesce a session var -

<%Session("EMPLOYETOKENS") =
tokens.Fields.Item(COALESCE(SUM("JBCLTokens"),0)). Value%?

Thank you
Bob Barrows
Guest
 
Posts: n/a
#2: Oct 23 '08

re: COALESCE a Session Var ASP


GTN170777 wrote:
Quote:
Hi All, is this the correct way to Coalesce a session var -
>
<%Session("EMPLOYETOKENS") =
tokens.Fields.Item(COALESCE(SUM("JBCLTokens"),0)). Value%?
>
No, COALESCE is a T-SQL function. You should probably use it in the sql
statement being used to generate your resultset:

select ..., COALESCE(SUM("JBCLTokens"),0)) as SumJBCLTokens

In vbscript, you will need to create your own Coalesce function since
there is none built in.

--
HTH,
Bob Barrows


Closed Thread


Similar ASP / Active Server Pages bytes