This is a multi-part message in MIME format.

------=_NextPart_000_0253_01C0015C.C78A9120
Content-Type: text/plain;
        charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

RE: Null Values check 2Or,

<cfif isdefined("tempvalue") and not len(trim(tempvalue))>
it is null
<cfelseif isdefined("tempvalue") and len(trim(tempvalue))>
it is not null
<cfelse>
it ain't defined
</cfif>

You don't need all this code, depending on the need to determine the =
existence of the variable first.

the IIF() function is very slow, especially when throwing in the DE() =
function.

DC

  ----- Original Message -----=20
  From: Chapman, Katrina=20
  To: [EMAIL PROTECTED]=20
  Sent: Tuesday, August 08, 2000 17:11
  Subject: RE: Null Values check 2


  This will check for the existence and if it is null.=20

  <cfif IIF(IsDefined("tempValue"), "Trim(tempValue)", DE("")) IS "">=20
  It's Null=20
  </cfif>=20

  Or you could use=20

  <cfif IIF(IsDefined("tempValue"), "Trim(tempValue)", DE("")) IS NOT =
"">=20
  It's Not Null=20
  </cfif>=20

  --K=20

  -----Original Message-----=20
  From: Dempsey, Timothy F. [mailto:[EMAIL PROTECTED]]=20
  Sent: Tuesday, August 08, 2000 6:30 AM=20
  To: '[EMAIL PROTECTED]'=20
  Subject: RE: Null Values check 2=20



  Aslam,=20

  I think what you want is:=20

  <cfif NOT IsDefined("tempValue") ...  >=20

  I don't believe there is the equivalent of SQL's NULL in CF.=20

  The above will determine if there is such an entity called tempValue=20
  and if there is, there is stioll a possibility that it could be "" or =
0.=20



  -- Tim Dempsey=20



  -----Original Message-----=20
  From: aslam bajaria [mailto:[EMAIL PROTECTED]]=20
  Sent: Monday, August 07, 2000 6:06 PM=20
  To: [EMAIL PROTECTED]=20
  Subject: Null Values check 2=20



  When I used the statement :=20
  <cfif tempValue is NULL>=20
  ...=20
  </cfif>=20

  I got the following error. Is there a different way of=20
  checking for NULL?!=20

  Error Occurred While Processing Request=20
  Error Diagnostic Information=20
  Error resolving parameter NULL=20



  ColdFusion was unable to determine the value of the=20
  parameter. This problem is very likely due to the fact=20
  that either:=20

  You have misspelled the parameter name, or=20
  You have not specified a QUERY attribute for a=20
  CFOUTPUT, CFMAIL, or CFTABLE tag.=20



  --- Marcus <[EMAIL PROTECTED]> wrote:=20
  > > Hi All,=20
  > >=20
  > > I am getting an error when I write a code like:=20
  > >=20
  > > <cfif tempValue eq null>=20
  > >=20
  > > ...=20
  > >=20
  > > </cfif>=20
  > >=20
  > > If I write=20
  > >=20
  > > <cfif tempValue eq "">=20
  > > ...=20
  > > </cfif>=20
  >=20
  > Null values can't use EQ or =3D, you need to ask=20
  >=20
  > <cfif tempValue is NULL>=20
  >=20
  =
-------------------------------------------------------------------------=
---=20
  --=20
  > Archives:=20
  >=20
  http://www.mail-archive.com/cf-talk@houseoffusion.com/=20
  > To Unsubscribe visit=20
  >=20
  =
http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&body=3Dlists/cf_ta=
lk=20
  > or send a message to=20
  > [EMAIL PROTECTED] with 'unsubscribe'=20
  > in the body.=20



  __________________________________________________=20
  Do You Yahoo!?=20
  Kick off your party with Yahoo! Invites.=20
  http://invites.yahoo.com/=20
  =
-------------------------------------------------------------------------=
---=20
  --=20
  Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/=20
  To Unsubscribe visit=20
  =
http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&body=3Dlists/cf_ta=
lk or=20
  send a message to [EMAIL PROTECTED] with 'unsubscribe' =
in=20
  the body.=20
  =
-------------------------------------------------------------------------=
---=20
  --=20
  Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/=20
  To Unsubscribe visit=20
  =
http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&body=3Dlists/cf_ta=
lk or=20
  send a message to [EMAIL PROTECTED] with 'unsubscribe' =
in=20
  the body.=20
  =
-------------------------------------------------------------------------=
-----=20
  Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/=20
  To Unsubscribe visit =
http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&body=3Dlists/cf_ta=
lk or send a message to [EMAIL PROTECTED] with =
'unsubscribe' in the body.


------=_NextPart_000_0253_01C0015C.C78A9120
Content-Type: text/html;
        charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: Null Values check 2</TITLE>
<META content=3D"text/html; charset=3Dwindows-1252" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3018.900" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Or,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;cfif isdefined("tempvalue") and not =

len(trim(tempvalue))&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>it is null</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&lt;cfelseif isdefined("tempvalue") and =

len(trim(tempvalue))&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>it is not null</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&lt;cfelse&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>it ain't defined</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&lt;/cfif&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>You don't need all this code, depending =
on the need=20
to determine the existence of the variable first.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>the IIF() function is very slow, =
especially when=20
throwing in the DE() function.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>DC</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">&nbsp;</DIV>
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A href=3D"mailto:[EMAIL PROTECTED]" =
[EMAIL PROTECTED]>Chapman,=20
  Katrina</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
  href=3D"mailto:[EMAIL PROTECTED]"=20
  [EMAIL PROTECTED]>[EMAIL PROTECTED]</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Tuesday, August 08, 2000=20
17:11</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> RE: Null Values check =
2</DIV>
  <DIV><BR></DIV>
  <P><FONT size=3D2>This will check for the existence and if it is =
null.</FONT>=20
  </P>
  <P><FONT size=3D2>&lt;cfif IIF(IsDefined("tempValue"), =
"Trim(tempValue)",=20
  DE("")) IS ""&gt;</FONT> <BR><FONT size=3D2>It's Null</FONT> <BR><FONT =

  size=3D2>&lt;/cfif&gt;</FONT> </P>
  <P><FONT size=3D2>Or you could use</FONT> </P>
  <P><FONT size=3D2>&lt;cfif IIF(IsDefined("tempValue"), =
"Trim(tempValue)",=20
  DE("")) IS NOT ""&gt;</FONT> <BR><FONT size=3D2>It's Not Null</FONT> =
<BR><FONT=20
  size=3D2>&lt;/cfif&gt;</FONT> </P>
  <P><FONT size=3D2>--K</FONT> </P>
  <P><FONT size=3D2>-----Original Message-----</FONT> <BR><FONT =
size=3D2>From:=20
  Dempsey, Timothy F. [<A=20
  =
href=3D"mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]</A>]</FONT> =

  <BR><FONT size=3D2>Sent: Tuesday, August 08, 2000 6:30 AM</FONT> =
<BR><FONT=20
  size=3D2>To: '[EMAIL PROTECTED]'</FONT> <BR><FONT =
size=3D2>Subject: RE:=20
  Null Values check 2</FONT> </P><BR>
  <P><FONT size=3D2>Aslam,</FONT> </P>
  <P><FONT size=3D2>I think what you want is:</FONT> </P>
  <P><FONT size=3D2>&lt;cfif NOT IsDefined("tempValue") ...&nbsp; =
&gt;</FONT> </P>
  <P><FONT size=3D2>I don't believe there is the equivalent of SQL's =
NULL in=20
  CF.</FONT> </P>
  <P><FONT size=3D2>The above will determine if there is such an entity =
called=20
  tempValue</FONT> <BR><FONT size=3D2>and if there is, there is stioll a =

  possibility that it could be "" or 0.</FONT> </P><BR>
  <P><FONT size=3D2>-- Tim Dempsey</FONT> </P><BR>
  <P><FONT size=3D2>-----Original Message-----</FONT> <BR><FONT =
size=3D2>From: aslam=20
  bajaria [<A=20
  =
href=3D"mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]</A>]=
</FONT>=20
  <BR><FONT size=3D2>Sent: Monday, August 07, 2000 6:06 PM</FONT> =
<BR><FONT=20
  size=3D2>To: [EMAIL PROTECTED]</FONT> <BR><FONT =
size=3D2>Subject: Null=20
  Values check 2</FONT> </P><BR>
  <P><FONT size=3D2>When I used the statement :</FONT> <BR><FONT =
size=3D2>&lt;cfif=20
  tempValue is NULL&gt;</FONT> <BR><FONT size=3D2>...</FONT> <BR><FONT=20
  size=3D2>&lt;/cfif&gt;</FONT> </P>
  <P><FONT size=3D2>I got the following error. Is there a different way =
of</FONT>=20
  <BR><FONT size=3D2>checking for NULL?!</FONT> </P>
  <P><FONT size=3D2>Error Occurred While Processing Request</FONT> =
<BR><FONT=20
  size=3D2>Error Diagnostic Information</FONT> <BR><FONT size=3D2>Error =
resolving=20
  parameter NULL</FONT> </P><BR>
  <P><FONT size=3D2>ColdFusion was unable to determine the value of =
the</FONT>=20
  <BR><FONT size=3D2>parameter. This problem is very likely due to the =
fact</FONT>=20
  <BR><FONT size=3D2>that either: </FONT></P>
  <P><FONT size=3D2>You have misspelled the parameter name, or =
</FONT><BR><FONT=20
  size=3D2>You have not specified a QUERY attribute for a</FONT> =
<BR><FONT=20
  size=3D2>CFOUTPUT, CFMAIL, or CFTABLE tag. </FONT></P><BR>
  <P><FONT size=3D2>--- Marcus &lt;[EMAIL PROTECTED]&gt; wrote:</FONT> =
<BR><FONT=20
  size=3D2>&gt; &gt; Hi All,</FONT> <BR><FONT size=3D2>&gt; &gt; =
</FONT><BR><FONT=20
  size=3D2>&gt; &gt; I am getting an error when I write a code =
like:</FONT>=20
  <BR><FONT size=3D2>&gt; &gt; </FONT><BR><FONT size=3D2>&gt; &gt; =
&lt;cfif=20
  tempValue eq null&gt;</FONT> <BR><FONT size=3D2>&gt; &gt; =
</FONT><BR><FONT=20
  size=3D2>&gt; &gt; ...</FONT> <BR><FONT size=3D2>&gt; &gt; =
</FONT><BR><FONT=20
  size=3D2>&gt; &gt; &lt;/cfif&gt;</FONT> <BR><FONT size=3D2>&gt; &gt;=20
  </FONT><BR><FONT size=3D2>&gt; &gt; If I write</FONT> <BR><FONT =
size=3D2>&gt; &gt;=20
  </FONT><BR><FONT size=3D2>&gt; &gt; &lt;cfif tempValue eq =
""&gt;</FONT>=20
  <BR><FONT size=3D2>&gt; &gt; ...</FONT> <BR><FONT size=3D2>&gt; &gt;=20
  &lt;/cfif&gt;</FONT> <BR><FONT size=3D2>&gt; </FONT><BR><FONT =
size=3D2>&gt; Null=20
  values can't use EQ or =3D, you need to ask </FONT><BR><FONT =
size=3D2>&gt;=20
  </FONT><BR><FONT size=3D2>&gt; &lt;cfif tempValue is NULL&gt;</FONT> =
<BR><FONT=20
  size=3D2>&gt;</FONT> <BR><FONT=20
  =
size=3D2>----------------------------------------------------------------=
------------</FONT>=20
  <BR><FONT size=3D2>--</FONT> <BR><FONT size=3D2>&gt; Archives:</FONT> =
<BR><FONT=20
  size=3D2>&gt;</FONT> <BR><FONT size=3D2><A=20
  href=3D"http://www.mail-archive.com/cf-talk@houseoffusion.com/"=20
  =
target=3D_blank>http://www.mail-archive.com/cf-talk@houseoffusion.com/</A=
></FONT>=20
  <BR><FONT size=3D2>&gt; To Unsubscribe visit</FONT> <BR><FONT =
size=3D2>&gt;</FONT>=20
  <BR><FONT size=3D2><A=20
  =
href=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&amp;body=3D=
lists/cf_talk"=20
  =
target=3D_blank>http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&am=
p;body=3Dlists/cf_talk</A></FONT>=20
  <BR><FONT size=3D2>&gt; or send a message to</FONT> <BR><FONT =
size=3D2>&gt;=20
  [EMAIL PROTECTED] with 'unsubscribe'</FONT> <BR><FONT=20
  size=3D2>&gt; in the body.</FONT> </P><BR>
  <P><FONT =
size=3D2>__________________________________________________</FONT>=20
  <BR><FONT size=3D2>Do You Yahoo!?</FONT> <BR><FONT size=3D2>Kick off =
your party=20
  with Yahoo! Invites.</FONT> <BR><FONT size=3D2><A=20
  href=3D"http://invites.yahoo.com/"=20
  target=3D_blank>http://invites.yahoo.com/</A></FONT> <BR><FONT=20
  =
size=3D2>----------------------------------------------------------------=
------------</FONT>=20
  <BR><FONT size=3D2>--</FONT> <BR><FONT size=3D2>Archives: <A=20
  href=3D"http://www.mail-archive.com/cf-talk@houseoffusion.com/"=20
  =
target=3D_blank>http://www.mail-archive.com/cf-talk@houseoffusion.com/</A=
></FONT>=20
  <BR><FONT size=3D2>To Unsubscribe visit</FONT> <BR><FONT size=3D2><A=20
  =
href=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&amp;body=3D=
lists/cf_talk"=20
  =
target=3D_blank>http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&am=
p;body=3Dlists/cf_talk</A>=20
  or</FONT> <BR><FONT size=3D2>send a message to =
[EMAIL PROTECTED]=20
  with 'unsubscribe' in</FONT> <BR><FONT size=3D2>the body.</FONT> =
<BR><FONT=20
  =
size=3D2>----------------------------------------------------------------=
------------</FONT>=20
  <BR><FONT size=3D2>--</FONT> <BR><FONT size=3D2>Archives: <A=20
  href=3D"http://www.mail-archive.com/cf-talk@houseoffusion.com/"=20
  =
target=3D_blank>http://www.mail-archive.com/cf-talk@houseoffusion.com/</A=
></FONT>=20
  <BR><FONT size=3D2>To Unsubscribe visit</FONT> <BR><FONT size=3D2><A=20
  =
href=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&amp;body=3D=
lists/cf_talk"=20
  =
target=3D_blank>http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&am=
p;body=3Dlists/cf_talk</A>=20
  or</FONT> <BR><FONT size=3D2>send a message to =
[EMAIL PROTECTED]=20
  with 'unsubscribe' in</FONT> <BR><FONT size=3D2>the body.</FONT> =
<BR><FONT=20
  =
size=3D2>----------------------------------------------------------------=
--------------</FONT>=20
  <BR><FONT size=3D2>Archives: <A=20
  href=3D"http://www.mail-archive.com/cf-talk@houseoffusion.com/"=20
  =
target=3D_blank>http://www.mail-archive.com/cf-talk@houseoffusion.com/</A=
></FONT>=20
  <BR><FONT size=3D2>To Unsubscribe visit <A=20
  =
href=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&amp;body=3D=
lists/cf_talk"=20
  =
target=3D_blank>http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&am=
p;body=3Dlists/cf_talk</A>=20
  or send a message to [EMAIL PROTECTED] with =
'unsubscribe' in=20
  the body.</FONT></P></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0253_01C0015C.C78A9120--

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to