COALESCE a Session Var ASP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?R1ROMTcwNzc3?=

    #1

    COALESCE a Session Var ASP

    Hi All, is this the correct way to Coalesce a session var -

    <%Session("EMPL OYETOKENS") =
    tokens.Fields.I tem(COALESCE(SU M("JBCLTokens") ,0)).Value%?

    Thank you
  • Bob Barrows

    #2
    Re: COALESCE a Session Var ASP

    GTN170777 wrote:
    Hi All, is this the correct way to Coalesce a session var -
    >
    <%Session("EMPL OYETOKENS") =
    tokens.Fields.I tem(COALESCE(SU M("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("J BCLTokens"),0)) as SumJBCLTokens

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

    --
    HTH,
    Bob Barrows


    Comment

    Working...