0

I have column "ЕИУ" that's text column. Some rows contains json values, but some can be NULL on not json(text for example.) I would like to extract all values that NOT json values.

enter image description here

enter image description here

None json values example

1
  • Sample data is better presented as formatted text. See here for some tips on how to create nice looking tables. And please add some of the "non-JSON"" data that you have when you edit your question because I can't see any evidence of that in your screen shot Commented Feb 12, 2020 at 7:24

1 Answer 1

1

Looking at your sample data, you can simply get this using NOT LIKE

select * from your_table where column_name not like '{%}'

Otherwise, you can create a function that will try casting to JSON and return true or false based on that output.

select * from your_table where your_json_function(your_column);
Sign up to request clarification or add additional context in comments.

1 Comment

Then you can check this demo @AlexNikitin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.