Pages

Wednesday, November 11, 2015

how to clear cached queries coldfusion

how to clear cached queries coldfusion

<cfloop index="cache" array="#cacheGetAllIds()#">
<cfset cacheRemove(cache)>
</cfloop>


http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec1f1ac-7fd8.html

Thursday, November 5, 2015

very useful functions: ISNULL and NULLIF -


this we can use when we want to replace null with your own value.

ISNULL

columnName - is null here
my value -- your custom value

select ISNULL(columnName ,'my value') as newvalue, *  from  table



--------------------------------------------------------------------------------------------



 NULLif

here function will display NULL if columnName mataches with yourValue
else it will display column's value from table

select NULLif( columnName,'yourValue') as NEWcurrencycode, * from  table