Re: Continuous NULL value in a column
Apparently you mean not continuous (table columns are obviously discrete) but rather consecutive Nulls found when the table is ordered on a certain column.
Counting runs of consecutive values is most easily done by sucking relevant rows into a buffer using a language that has a MySQL API, eg PHP, and counting runs in the buffer.
SQL isn't so good for row-to-row logic. It can be done with SQL, but awkwardly, using user variables: set a @len value to 0, as you process each Null value, increment @len; when a non-null value occurs, reset @len, &c.
Subject
Written By
Posted
Re: Continuous NULL value in a column
March 30, 2017 11:16PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.