regex - SQLite DB Browser: invalid operand for regexp -
i used db browser sqlite version 3.6.0; sqlite version 3.8.9. application supports regular expression out of box (sqlitebrowser). can use regexp
on column brand
failed on column revision
;
for example
select brand,revision tdevice tdevice.brand regexp '^asus$'
and result 114 rows returned from: select brand,revision tdevice tdevice.brand regexp '^asus$'; (took 51ms)
however, if regexp
applied on different column, error
select brand,revision tdevice tdevice.revision regexp '^asus$';
and error message invalid operand: select brand,revision tdevice tdevice.revision regexp '^asus$';
both brand , revision of text type. table creation schema below:
create table `tdevice` ( `id` integer not null, `brand` varchar(128) not null, `model` varchar(128) not null, `revision` text, primary key(id) );
both brand , revision of text type. table creation schema below:
no different see table description correctly if change text
varchar
work fine.
or check , inform how use regex
or can use regex
text
datatype.
or can convert(cast) text
varchar , can perform match operations
see post how cast text varchar need convert text field varchar temporarily can pass stored procedure
Comments
Post a Comment