Aiden,

> Does anyone know the correct syntax which allows you to do something
> like this (below) in a cfquery block, so that if anything was supplied
> in a form field, it returns the string "null", otherwise, it's evaluated
> and wrapped in single quotes:
> #Iif(not Len(Trim(Form.Field)), "null", "'" & DE(Trim(Form.Field)) &"'")#
>
Your DE aren't in the right price.

#IIF(not Len(trim(Form.fieldname)),
DE("Null"),DE("'"&Trim(form.fieldname)&"'"))#

but why not use

<cfif Len(Trim(form.fieldname)) EQ 0>IS
NULL<cfelse>'#Trim(form.fieldname)#'</cfif>

Stephen



-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to