You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Help with If statement

Accepted answer
92
Views
10
Comments

Summary: Help with If statement


Content (required): Hello, I'm trying to update the column of a report with this logic - If the count of the answer views is great than 1, print the count, else print zero. Below is the sql i am using. It gives me an error that says "Expressions for comparison operators must be same type." Any help is appreciated. Thanks!

if(count(answers.a_id) >'0', count(answers.a_id), '0')


Version (include the version you are using, if applicable): 22D


Code Snippet (add any code snippets that support your topic, if applicable):

if(count(answers.a_id) >'0', count(answers.a_id), '0')

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!