COALESCE a Session Var ASP

G

GTN170777

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

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

Thank you
 
B

Bob Barrows

GTN170777 said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top