Connecting Tech Pros Worldwide Help | Site Map

COALESCE a Session Var ASP

  #1  
Old October 23rd, 2008, 11:55 AM
=?Utf-8?B?R1ROMTcwNzc3?=
Guest
 
Posts: n/a
Hi All, is this the correct way to Coalesce a session var -

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

Thank you
  #2  
Old October 23rd, 2008, 02:25 PM
Bob Barrows
Guest
 
Posts: n/a

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 Threads
Thread Thread Starter Forum Replies Last Post
MySQL tips that I have come across Mike Chirico answers 0 July 20th, 2005 01:09 AM