1. Andrew Davis
  2. PowerBuilder
  3. Wednesday, 11 September 2024 11:15 AM UTC

Hi,

Using PB2019 SQLAnywhere 16

I want to create a computed field on a grid datawindow. I am trying to use isnull()

so on the computed field i wrote isnull(amount)

I get the following error 

SQLSTATE = 37000

[Sybase][ODBC Driver][SQL Anywhere]Wrong number of parameters to function 'isnull'

 

I have attached a pic of the data selection.

 

As always thanks in advance for your help it is much appreciated

 

Attachments (1)
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 11 September 2024 11:55 AM UTC
  2. PowerBuilder
  3. # 1

Hi.

This isn't really a a Powerbuilder question. It's about isnull function syntax in SQL Anywhere. Anyway. Follows the function description from SQL Anywhere help...

Syntax
ISNULL( expression, expression [, ...] )
Parameters
  • expression

    An expression to be tested against NULL.

    At least two expressions must be passed into the function, and all expressions must be comparable.

You need at least two params: a) value to evaluate, b) a value to show in case a evaluates to null.

Andreas.

Comment
  1. Armeen Mazda @Appeon
  2. Friday, 13 September 2024 02:25 AM UTC
Thanks Andreas for your help!
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.