select - MySQL set the result of a query = to a column binary -
i want create new variable/column in dataset signifies presence or lack there of data mining query.
i thought be:
select * @variable1 dataset contents rlike '[[:<:]]foo[[:>:]]' or contents rlike '[[:<:]]example[[:>:]]' however error:
operand should contain 1 column(s).
i think somehow need select binary (not *), not sure how this.
you need 2 things in order accomplish this.
first, must alter dataset have column result:
alter table dataset add contents_flag tinyint(1) not null default 0. now, need update new dataset column results of query:
update dataset set contents_flag = 1 contents rlike '[[:<:]]foo[[:>:]]' or contents rlike '[[:<:]]example[[:>:]]'
Comments
Post a Comment