Query of Queries error in Coldfusion when using LIKE

May 06, 2007
This very odd behaviour hit me the other day when querying an existing query which was in a scope (i.e request.query): The query should look like this: "query" name="getReltrans"> SELECT * from request.translations WHERE ComposerID LIKE '%#somevar#%'; But it throws an error. The reason is, when querying a query object, you need to tell Coldfusion not to return NULL values. This works: "query" name="getReltrans"> SELECT * from request.translations WHERE (ComposerID IS NOT NULL AND ComposerID LIKE '%#somevar#%'); Thanks to Ben Nadel for the heads up!

Comments

Write your comment



(it will not be displayed)





About Tom

Tom is the author of this blog and the brains behind OxAlto Design More ...

Categories

Monthly Archives

Links

Tag Cloud

coldfusion web-development internet misc music cfwheels railo drupal vps chchchoir blueprintcss jquery mangoblog flex ipod mac wowza demos flash flickr google hinkseystudio itunesu wallpapers wordpress

Feeds