How to pass NULL to queryService.addParam and query for it?

Hi, how do I pass NULL to queryService.addParam and query for it?

The DeletetAt column is datetime and can be NULL. I wand check for NULL
values.

var queryService = new query();
queryService.setDatasource("#application.wheels.dataSourceName#");
queryService.addParam(name=“IsDeleted”, value="",
cfsqltype=“CF_SQL_VARCHAR”);

queryService.setSQL("
SELECT *
FROM users
WHERE DeletedAt is :IsDeleted

Regards
Thorsten

That’s a good plan! :wink:

Just type IS NULL in your query, no need for queryParam.On Saturday, 20 June 2015 17:11:33 UTC+3, thorste...@googlemail.com wrote:

Hi, how do I pass NULL to queryService.addParam and query for it?

The DeletetAt column is datetime and can be NULL. I wand check for NULL
values.

var queryService = new query();
queryService.setDatasource("#application.wheels.dataSourceName#");
queryService.addParam(name=“IsDeleted”, value="",
cfsqltype=“CF_SQL_VARCHAR”);

queryService.setSQL("
SELECT *
FROM users
WHERE DeletedAt is :IsDeleted

Regards
Thorsten