Error while finding and replacing NULL Values?

Error while finding and replacing NULL Values?

rajankur6494
Collaborator Collaborator
57 Views
2 Replies
Message 1 of 3

Error while finding and replacing NULL Values?

rajankur6494
Collaborator
Collaborator

[ FlexSim 21.0.10 ]

Hi Team,

I am assigning label based on sql query. But since all token are not meeting criteria, there are null values for label. I want to assign null values by 0. There are some errors and if condition is not working to compare null values.

1658991110312.png

Can you help me to know what is going wrong here?

28.07.2022_Replacing_NULL_Values.fsm

Thank you!


0 Likes
Accepted solutions (1)
58 Views
2 Replies
Replies (2)
Message 2 of 3

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

If the query doesn't find any rows that fit the condition, the result table is empty. So when attempting to read the first value, you get the error that there is no row 1 in the table.

Instead you should check if there are any rows in the table at all. If not, you can directly return the desired value.

1658999264077.png

Message 3 of 3

rajankur6494
Collaborator
Collaborator
Thank you! @Felix Möhlmann

Understood well.

0 Likes