Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > COALESCE a Session Var ASP

Reply
Thread Tools

COALESCE a Session Var ASP

 
 
GTN170777
Guest
Posts: n/a
 
      10-23-2008
Hi All, is this the correct way to Coalesce a session var -

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

Thank you
 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      10-23-2008
GTN170777 wrote:
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Manually building a DS and/or can coalesce handle this? darrel ASP .Net 3 03-08-2006 09:23 PM
Difference between Session["var"] and Session("var") thomson ASP .Net 10 06-20-2005 01:02 PM
Difference between Session["var"] and Session("var") thomson ASP .Net 0 06-20-2005 10:54 AM
Threads.. Session var lost, App var ok Alvin Bruney ASP .Net 1 12-02-2003 01:56 AM
does "struct_name var = { 0 }; " fill var with 0? Fred C++ 3 08-10-2003 09:44 AM



Advertisments