Reports Question - Not Show null tables

Shoot okay I did another void with another admin pin and it broke it. Nevermind I fixed it with a comma delimiter :slight_smile:

You’re the best man. This just saved me so much headache. Really appreciate it.

1 Like

May be do you try that with older MS SQL versions than 2016?

The OPENJSON function is available only under compatibility level 130 or higher. If your database compatibility level is lower than 130, SQL Server can’t find and run the OPENJSON function.

Good to know for next time I take on an SQL task. I certainly learned a lot.

Thankfully Jesse came to the rescue with 1 line of code to replace 25 lines haha.

I think the “void” saved in S not SN.

Please try so with

AND OState_State = 'Void’

also;
AND OState_StateName = ‘Void’ is wrong

  • OState_State define S
  • OState_StateName define SN

you need S, not SN 
so can you get a result with Void.

If you read the posts above the sql was correct. Everything worked fine.

Anyways I got another solution that is much simpler. Thanks for trying though

1 Like

i never give up :slight_smile:
i cant see where you make mistakes but very quickly I found one.

First.
you must declare start/endDate as DATETIME not varchar.

image

here is a working version:

image

On the fast, this SQL’s made without thought but Jesse solution is definitely better


2 Likes