Grokbase
x

[Dbix-class] How to search records with "IS NOT NULL"

View PostFlat  Thread  Threaded | Next >
Ramprabhu Kaliaperumal [Dbix-class] How to search records with "IS NOT NULL"
| +1 vote
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Hi All

I want something like 'SELECT * FROM employee WHERE department IS NOT NULL'

I tried $schema->resultset('employee')->search({ department => {"IS" =>
"NOT NULL"}});

But it is not working...

Any help?

Thanks
-Ram

Thread : [Dbix-class] How to search records with "IS NOT NULL"
1)
Ramprabhu Kaliaperumal Hi All I want something like 'SELECT * FROM employee WHERE department IS NOT NULL' I tried...
2)
Matt S Trout SQL::Abstract and DBIx::Class both treat undef as NULL. Just pass => { '!=', undef } and it'll do...
3)
Fernan Aguero | Hi All | I want something like 'SELECT * FROM employee WHERE department IS NOT NULL' | I tried...
4)
Jason Thaxter Any suggestions on how to use the overlaps operator? Using Postgresql.. I read the SQL::Abstract...
spacer
View PostFlat  Thread  Threaded | Next >